Modified: karaf/site/production/manual/latest/users-guide/jre-tuning.html URL: http://svn.apache.org/viewvc/karaf/site/production/manual/latest/users-guide/jre-tuning.html?rev=1484249&r1=1484248&r2=1484249&view=diff ============================================================================== --- karaf/site/production/manual/latest/users-guide/jre-tuning.html (original) +++ karaf/site/production/manual/latest/users-guide/jre-tuning.html Sun May 19 09:53:10 2013 @@ -93,7 +93,7 @@ <div id="wrapper-menu-page-top"> <div id="wrapper-menu-page-bottom"> <div id="menu-page"> - <h3 id="Homeindex"><a href="../index.html">Home</a></h3><ul style="list-style: square"><li><a href="../overview.html">Overview</a></li><li><a href="../quick-start.html">Quick Start</a></li></ul><h3 id="UsersGuideusersguideindex"><a href="index.html">Users Guide</a></h3><ul style="list-style: square"><li><a href="installation.html">Installing Karaf</a></li><li><a href="directory-structure.html">Directory Structure</a></li><li><a href="start-stop.html">Starting and stopping Karaf</a></li><li><a href="wrapper.html">OS integration</a></li><li><a href="configuration.html">Configuration</a></li><li><a href="using-console.html">Using the console</a></li><li><a href="web-console.html">Web console</a></li><li><a href="remote-console.html">Remote console</a></li><li><a href="web-console.html">Web console</a></li><li><a href="deployer.html">Deployer</a></li><li><a href="child-instances.html">Child instances</a></li><li><a href="security.html">Security</a></li><l i><a href="failover.html">Failover Deployments</a></li><li><a href="logging-system.html">Logging system</a></li><li><a href="provisioning.html">Provisioning</a></li><li><a href="kar.html">KAR archive</a></li><li><a href="jre-tuning.html">JRE tuning</a></li><li><a href="web-applications.html">Web applications</a></li><li><a href="http.html">HTTP service</a></li><li><a href="jmx.html">JMX for monitoring and administration</a></li></ul><h3 id="DevelopersGuidedevelopersguideindex"><a href="../developers-guide/index.html">Developers Guide</a></h3><ul style="list-style: square"><li><a href="../developers-guide/connect-console.html">Programmatically connect to the Console</a></li><li><a href="../developers-guide/shell-syntax.html">Shell syntax</a></li><li><a href="../developers-guide/creating-bundles.html">Creating bundles</a></li><li><a href="../developers-guide/debugging.html">Troubleshooting, Debugging and Profiling</a></li><li><a href="../developers-guide/developer-command.html ">Developer Commands</a></li><li><a href="../developers-guide/archetypes.html">Maven Archetypes</a></li><li><a href="../developers-guide/extending-console.html">Extending the Console</a></li><li><a href="../developers-guide/branding-console.html">Branding the Console</a></li><li><a href="../developers-guide/karaf-maven-plugin.html">Using the Karaf Maven plugin</a></li><li><a href="../developers-guide/security-framework.html">Security Framework</a></li><li><a href="../developers-guide/custom-distribution.html">Custom Distribution</a></li><li><a href="../developers-guide/debugging.html">Troubleshooting, Debugging and Profiling</a></li><li><a href="../developers-guide/connect-console.html">Programmatically connect to the console</a></li><li><a href="../developers-guide/writing-tests.html">Writing integration tests</a></li><li><a href="../developers-guide/creating-bundles.html">Creating bundles</a></li><li><a href="../developers-guide/shell-syntax.html">Shell syntax</a></li><li> <a href="../developers-guide/github-contributions.html">Github Contributions</a></li></ul><h3 id="Commandscommandscommands"><a href="../commands/commands.html">Commands</a></h3> + <h3 id="Homeindex"><a href="../index.html">Home</a></h3><ul style="list-style: square"><li><a href="../overview.html">Overview</a></li><li><a href="../quick-start.html">Quick Start</a></li></ul><h3 id="UsersGuideusersguideindex"><a href="index.html">Users Guide</a></h3><ul style="list-style: square"><li><a href="installation.html">Installing Karaf</a></li><li><a href="directory-structure.html">Directory Structure</a></li><li><a href="start-stop.html">Starting and stopping Karaf</a></li><li><a href="wrapper.html">OS integration</a></li><li><a href="configuration.html">Configuration</a></li><li><a href="using-console.html">Using the console</a></li><li><a href="web-console.html">Web console</a></li><li><a href="remote-console.html">Remote console</a></li><li><a href="web-console.html">Web console</a></li><li><a href="deployer.html">Deployer</a></li><li><a href="child-instances.html">Child instances</a></li><li><a href="security.html">Security</a></li><l i><a href="failover.html">Failover Deployments</a></li><li><a href="logging-system.html">Logging system</a></li><li><a href="provisioning.html">Provisioning</a></li><li><a href="kar.html">KAR archive</a></li><li><a href="jre-tuning.html">JRE tuning</a></li><li><a href="web-applications.html">Web applications</a></li><li><a href="http.html">HTTP service</a></li><li><a href="jmx.html">JMX for monitoring and administration</a></li></ul><h3 id="DevelopersGuidedevelopersguideindex"><a href="../developers-guide/index.html">Developers Guide</a></h3><ul style="list-style: square"><li><a href="../developers-guide/connect-console.html">Programmatically connect to the Console</a></li><li><a href="../developers-guide/shell-syntax.html">Shell syntax</a></li><li><a href="../developers-guide/creating-bundles.html">Creating bundles</a></li><li><a href="../developers-guide/debugging.html">Troubleshooting, Debugging and Profiling</a></li><li><a href="../developers-guide/developer-commands.htm l">Developer Commands</a></li><li><a href="../developers-guide/archetypes.html">Maven Archetypes</a></li><li><a href="../developers-guide/extending-console.html">Extending the Console</a></li><li><a href="../developers-guide/branding-console.html">Branding the Console</a></li><li><a href="../developers-guide/karaf-maven-plugin.html">Using the Karaf Maven plugin</a></li><li><a href="../developers-guide/security-framework.html">Security Framework</a></li><li><a href="../developers-guide/custom-distribution.html">Custom Distribution</a></li><li><a href="../developers-guide/debugging.html">Troubleshooting, Debugging and Profiling</a></li><li><a href="../developers-guide/connect-console.html">Programmatically connect to the console</a></li><li><a href="../developers-guide/writing-tests.html">Writing integration tests</a></li><li><a href="../developers-guide/creating-bundles.html">Creating bundles</a></li><li><a href="../developers-guide/shell-syntax.html">Shell syntax</a></li><li ><a href="../developers-guide/github-contributions.html">Github >Contributions</a></li></ul><h3 id="Commandscommandscommands"><a >href="../commands/commands.html">Commands</a></h3> </div> </div> </div>
Modified: karaf/site/production/manual/latest/users-guide/kar.html URL: http://svn.apache.org/viewvc/karaf/site/production/manual/latest/users-guide/kar.html?rev=1484249&r1=1484248&r2=1484249&view=diff ============================================================================== --- karaf/site/production/manual/latest/users-guide/kar.html (original) +++ karaf/site/production/manual/latest/users-guide/kar.html Sun May 19 09:53:10 2013 @@ -93,7 +93,7 @@ <div id="wrapper-menu-page-top"> <div id="wrapper-menu-page-bottom"> <div id="menu-page"> - <h3 id="Homeindex"><a href="../index.html">Home</a></h3><ul style="list-style: square"><li><a href="../overview.html">Overview</a></li><li><a href="../quick-start.html">Quick Start</a></li></ul><h3 id="UsersGuideusersguideindex"><a href="index.html">Users Guide</a></h3><ul style="list-style: square"><li><a href="installation.html">Installing Karaf</a></li><li><a href="directory-structure.html">Directory Structure</a></li><li><a href="start-stop.html">Starting and stopping Karaf</a></li><li><a href="wrapper.html">OS integration</a></li><li><a href="configuration.html">Configuration</a></li><li><a href="using-console.html">Using the console</a></li><li><a href="web-console.html">Web console</a></li><li><a href="remote-console.html">Remote console</a></li><li><a href="web-console.html">Web console</a></li><li><a href="deployer.html">Deployer</a></li><li><a href="child-instances.html">Child instances</a></li><li><a href="security.html">Security</a></li><l i><a href="failover.html">Failover Deployments</a></li><li><a href="logging-system.html">Logging system</a></li><li><a href="provisioning.html">Provisioning</a></li><li><a href="kar.html">KAR archive</a></li><li><a href="jre-tuning.html">JRE tuning</a></li><li><a href="web-applications.html">Web applications</a></li><li><a href="http.html">HTTP service</a></li><li><a href="jmx.html">JMX for monitoring and administration</a></li></ul><h3 id="DevelopersGuidedevelopersguideindex"><a href="../developers-guide/index.html">Developers Guide</a></h3><ul style="list-style: square"><li><a href="../developers-guide/connect-console.html">Programmatically connect to the Console</a></li><li><a href="../developers-guide/shell-syntax.html">Shell syntax</a></li><li><a href="../developers-guide/creating-bundles.html">Creating bundles</a></li><li><a href="../developers-guide/debugging.html">Troubleshooting, Debugging and Profiling</a></li><li><a href="../developers-guide/developer-command.html ">Developer Commands</a></li><li><a href="../developers-guide/archetypes.html">Maven Archetypes</a></li><li><a href="../developers-guide/extending-console.html">Extending the Console</a></li><li><a href="../developers-guide/branding-console.html">Branding the Console</a></li><li><a href="../developers-guide/karaf-maven-plugin.html">Using the Karaf Maven plugin</a></li><li><a href="../developers-guide/security-framework.html">Security Framework</a></li><li><a href="../developers-guide/custom-distribution.html">Custom Distribution</a></li><li><a href="../developers-guide/debugging.html">Troubleshooting, Debugging and Profiling</a></li><li><a href="../developers-guide/connect-console.html">Programmatically connect to the console</a></li><li><a href="../developers-guide/writing-tests.html">Writing integration tests</a></li><li><a href="../developers-guide/creating-bundles.html">Creating bundles</a></li><li><a href="../developers-guide/shell-syntax.html">Shell syntax</a></li><li> <a href="../developers-guide/github-contributions.html">Github Contributions</a></li></ul><h3 id="Commandscommandscommands"><a href="../commands/commands.html">Commands</a></h3> + <h3 id="Homeindex"><a href="../index.html">Home</a></h3><ul style="list-style: square"><li><a href="../overview.html">Overview</a></li><li><a href="../quick-start.html">Quick Start</a></li></ul><h3 id="UsersGuideusersguideindex"><a href="index.html">Users Guide</a></h3><ul style="list-style: square"><li><a href="installation.html">Installing Karaf</a></li><li><a href="directory-structure.html">Directory Structure</a></li><li><a href="start-stop.html">Starting and stopping Karaf</a></li><li><a href="wrapper.html">OS integration</a></li><li><a href="configuration.html">Configuration</a></li><li><a href="using-console.html">Using the console</a></li><li><a href="web-console.html">Web console</a></li><li><a href="remote-console.html">Remote console</a></li><li><a href="web-console.html">Web console</a></li><li><a href="deployer.html">Deployer</a></li><li><a href="child-instances.html">Child instances</a></li><li><a href="security.html">Security</a></li><l i><a href="failover.html">Failover Deployments</a></li><li><a href="logging-system.html">Logging system</a></li><li><a href="provisioning.html">Provisioning</a></li><li><a href="kar.html">KAR archive</a></li><li><a href="jre-tuning.html">JRE tuning</a></li><li><a href="web-applications.html">Web applications</a></li><li><a href="http.html">HTTP service</a></li><li><a href="jmx.html">JMX for monitoring and administration</a></li></ul><h3 id="DevelopersGuidedevelopersguideindex"><a href="../developers-guide/index.html">Developers Guide</a></h3><ul style="list-style: square"><li><a href="../developers-guide/connect-console.html">Programmatically connect to the Console</a></li><li><a href="../developers-guide/shell-syntax.html">Shell syntax</a></li><li><a href="../developers-guide/creating-bundles.html">Creating bundles</a></li><li><a href="../developers-guide/debugging.html">Troubleshooting, Debugging and Profiling</a></li><li><a href="../developers-guide/developer-commands.htm l">Developer Commands</a></li><li><a href="../developers-guide/archetypes.html">Maven Archetypes</a></li><li><a href="../developers-guide/extending-console.html">Extending the Console</a></li><li><a href="../developers-guide/branding-console.html">Branding the Console</a></li><li><a href="../developers-guide/karaf-maven-plugin.html">Using the Karaf Maven plugin</a></li><li><a href="../developers-guide/security-framework.html">Security Framework</a></li><li><a href="../developers-guide/custom-distribution.html">Custom Distribution</a></li><li><a href="../developers-guide/debugging.html">Troubleshooting, Debugging and Profiling</a></li><li><a href="../developers-guide/connect-console.html">Programmatically connect to the console</a></li><li><a href="../developers-guide/writing-tests.html">Writing integration tests</a></li><li><a href="../developers-guide/creating-bundles.html">Creating bundles</a></li><li><a href="../developers-guide/shell-syntax.html">Shell syntax</a></li><li ><a href="../developers-guide/github-contributions.html">Github >Contributions</a></li></ul><h3 id="Commandscommandscommands"><a >href="../commands/commands.html">Commands</a></h3> </div> </div> </div> Modified: karaf/site/production/manual/latest/users-guide/logging-system.html URL: http://svn.apache.org/viewvc/karaf/site/production/manual/latest/users-guide/logging-system.html?rev=1484249&r1=1484248&r2=1484249&view=diff ============================================================================== --- karaf/site/production/manual/latest/users-guide/logging-system.html (original) +++ karaf/site/production/manual/latest/users-guide/logging-system.html Sun May 19 09:53:10 2013 @@ -93,7 +93,7 @@ <div id="wrapper-menu-page-top"> <div id="wrapper-menu-page-bottom"> <div id="menu-page"> - <h3 id="Homeindex"><a href="../index.html">Home</a></h3><ul style="list-style: square"><li><a href="../overview.html">Overview</a></li><li><a href="../quick-start.html">Quick Start</a></li></ul><h3 id="UsersGuideusersguideindex"><a href="index.html">Users Guide</a></h3><ul style="list-style: square"><li><a href="installation.html">Installing Karaf</a></li><li><a href="directory-structure.html">Directory Structure</a></li><li><a href="start-stop.html">Starting and stopping Karaf</a></li><li><a href="wrapper.html">OS integration</a></li><li><a href="configuration.html">Configuration</a></li><li><a href="using-console.html">Using the console</a></li><li><a href="web-console.html">Web console</a></li><li><a href="remote-console.html">Remote console</a></li><li><a href="web-console.html">Web console</a></li><li><a href="deployer.html">Deployer</a></li><li><a href="child-instances.html">Child instances</a></li><li><a href="security.html">Security</a></li><l i><a href="failover.html">Failover Deployments</a></li><li><a href="logging-system.html">Logging system</a></li><li><a href="provisioning.html">Provisioning</a></li><li><a href="kar.html">KAR archive</a></li><li><a href="jre-tuning.html">JRE tuning</a></li><li><a href="web-applications.html">Web applications</a></li><li><a href="http.html">HTTP service</a></li><li><a href="jmx.html">JMX for monitoring and administration</a></li></ul><h3 id="DevelopersGuidedevelopersguideindex"><a href="../developers-guide/index.html">Developers Guide</a></h3><ul style="list-style: square"><li><a href="../developers-guide/connect-console.html">Programmatically connect to the Console</a></li><li><a href="../developers-guide/shell-syntax.html">Shell syntax</a></li><li><a href="../developers-guide/creating-bundles.html">Creating bundles</a></li><li><a href="../developers-guide/debugging.html">Troubleshooting, Debugging and Profiling</a></li><li><a href="../developers-guide/developer-command.html ">Developer Commands</a></li><li><a href="../developers-guide/archetypes.html">Maven Archetypes</a></li><li><a href="../developers-guide/extending-console.html">Extending the Console</a></li><li><a href="../developers-guide/branding-console.html">Branding the Console</a></li><li><a href="../developers-guide/karaf-maven-plugin.html">Using the Karaf Maven plugin</a></li><li><a href="../developers-guide/security-framework.html">Security Framework</a></li><li><a href="../developers-guide/custom-distribution.html">Custom Distribution</a></li><li><a href="../developers-guide/debugging.html">Troubleshooting, Debugging and Profiling</a></li><li><a href="../developers-guide/connect-console.html">Programmatically connect to the console</a></li><li><a href="../developers-guide/writing-tests.html">Writing integration tests</a></li><li><a href="../developers-guide/creating-bundles.html">Creating bundles</a></li><li><a href="../developers-guide/shell-syntax.html">Shell syntax</a></li><li> <a href="../developers-guide/github-contributions.html">Github Contributions</a></li></ul><h3 id="Commandscommandscommands"><a href="../commands/commands.html">Commands</a></h3> + <h3 id="Homeindex"><a href="../index.html">Home</a></h3><ul style="list-style: square"><li><a href="../overview.html">Overview</a></li><li><a href="../quick-start.html">Quick Start</a></li></ul><h3 id="UsersGuideusersguideindex"><a href="index.html">Users Guide</a></h3><ul style="list-style: square"><li><a href="installation.html">Installing Karaf</a></li><li><a href="directory-structure.html">Directory Structure</a></li><li><a href="start-stop.html">Starting and stopping Karaf</a></li><li><a href="wrapper.html">OS integration</a></li><li><a href="configuration.html">Configuration</a></li><li><a href="using-console.html">Using the console</a></li><li><a href="web-console.html">Web console</a></li><li><a href="remote-console.html">Remote console</a></li><li><a href="web-console.html">Web console</a></li><li><a href="deployer.html">Deployer</a></li><li><a href="child-instances.html">Child instances</a></li><li><a href="security.html">Security</a></li><l i><a href="failover.html">Failover Deployments</a></li><li><a href="logging-system.html">Logging system</a></li><li><a href="provisioning.html">Provisioning</a></li><li><a href="kar.html">KAR archive</a></li><li><a href="jre-tuning.html">JRE tuning</a></li><li><a href="web-applications.html">Web applications</a></li><li><a href="http.html">HTTP service</a></li><li><a href="jmx.html">JMX for monitoring and administration</a></li></ul><h3 id="DevelopersGuidedevelopersguideindex"><a href="../developers-guide/index.html">Developers Guide</a></h3><ul style="list-style: square"><li><a href="../developers-guide/connect-console.html">Programmatically connect to the Console</a></li><li><a href="../developers-guide/shell-syntax.html">Shell syntax</a></li><li><a href="../developers-guide/creating-bundles.html">Creating bundles</a></li><li><a href="../developers-guide/debugging.html">Troubleshooting, Debugging and Profiling</a></li><li><a href="../developers-guide/developer-commands.htm l">Developer Commands</a></li><li><a href="../developers-guide/archetypes.html">Maven Archetypes</a></li><li><a href="../developers-guide/extending-console.html">Extending the Console</a></li><li><a href="../developers-guide/branding-console.html">Branding the Console</a></li><li><a href="../developers-guide/karaf-maven-plugin.html">Using the Karaf Maven plugin</a></li><li><a href="../developers-guide/security-framework.html">Security Framework</a></li><li><a href="../developers-guide/custom-distribution.html">Custom Distribution</a></li><li><a href="../developers-guide/debugging.html">Troubleshooting, Debugging and Profiling</a></li><li><a href="../developers-guide/connect-console.html">Programmatically connect to the console</a></li><li><a href="../developers-guide/writing-tests.html">Writing integration tests</a></li><li><a href="../developers-guide/creating-bundles.html">Creating bundles</a></li><li><a href="../developers-guide/shell-syntax.html">Shell syntax</a></li><li ><a href="../developers-guide/github-contributions.html">Github >Contributions</a></li></ul><h3 id="Commandscommandscommands"><a >href="../commands/commands.html">Commands</a></h3> </div> </div> </div> @@ -103,49 +103,13 @@ <div class="wiki-content"> <h1 id="Loggingsystem">Logging system</h1><p>Karaf provides a powerful logging system based on <a href="http://team.ops4j.org/wiki/display/paxlogging/Pax+Logging">OPS4j Pax Logging</a>. </p><p>In addition to being a standard OSGi Log service, it supports the following APIs:</p><ul><li>Apache Commons Logging</li><li>SLF4J</li><li>Apache Log4j</li><li>Java Util Logging</li></ul><p>Karaf also comes with a set of console commands that can be used to display, view and change the log levels.</p><h2 id="Configuration">Configuration</h2><h3 id="Configurationfile">Configuration file</h3><p>The configuration of the logging system uses a <a href="http://logging.apache.org/log4j/1.2/manual.html">standard Log4j configuration file</a> at the following location:</p><pre> [karaf_install_dir]/etc/org.ops4j.pax.logging.cfg -</pre><p>You can edit this file at runtime and any change will be reloaded and be effective immediately.</p><h3 id="Configuringtheappenders">Configuring the appenders</h3><p>The default logging configuration defines three appenders:</p><ul><li>the <tt>stdout</tt> console appender is disabled by default. If you plan to run Karaf in server mode only (i.e. with the locale console disabled), you can turn on this appender on by adding it to the list of configured appenders using the <tt>log4j.rootLogger</tt> property</li><li>the <tt>out</tt> appender is the one enabled by default. It logs events to a number of rotating log files of a fixed size. You can easily change the parameters to control the number of files using <tt>maxBackupIndex</tt> and their size size <tt>maxFileSize</tt></li><li>the <tt>sift</tt> appender can be used instead to provide a per-bundle log file. The default configuration uses the bundle symbolic name as the file name to log to</li></ul><h3 id="Changingt heloglevels">Changing the log levels</h3><p>The default logging configuration sets the logging levels so that the log file will provide enough information to monitor the behavior of the runtime and provide clues about what caused a problem. However, the default configuration will not provide enough information to debug most problems.</p><p>The most useful logger to change when trying to debug an issue with Karaf is the root logger. You will want to set its logging level to <tt>DEBUG</tt> in the <tt>org.ops4j.pax.logging.cfg</tt> file.</p><div class="syntax"><pre name='code' class='brush: text; gutter: false;'><code> -log4j.rootLogger=DEBUG, out, osgi:VmLogAppender -...</code></pre></div><p>When debugging a problem in Karaf you may want to change the level of logging information that is displayed on the console. The example below shows how to set the root logger to <tt>DEBUG</tt> but limiting the information displayed on the console to WARN.</p><div class="syntax"><pre name='code' class='brush: text; gutter: false;'><code> -log4j.rootLogger=DEBUG, out, stdout, osgi:VmLogAppender -log4j.appender.stdout.threshold=WARN -...</code></pre></div><h2 id="ConsoleLogCommands">Console Log Commands</h2><p>The log subshell comes with the following commands:</p><ul><li><a href="../commands/log-clear.html"><tt>log:clear</tt></a>: clear the log</li><li><a href="../commands/log-display.html"><tt>log:display</tt></a>: display the last log entries</li><li><a href="../commands/log-display-exception.html"><tt>log:display-exception</tt></a>: display the last exception from the log</li><li><a href="../commands/log-get.html"><tt>log:get</tt></a>: show the log levels</li><li><a href="../commands/log-set.html"><tt>log:set</tt></a>: set the log levels</li><li><a href="../commands/log-tail.html"><tt>log:tail</tt></a>: continuous display of the log entries</li></ul><p>For example, if you want to debug something, you might want to run the following commands:</p><pre> +</pre><p>You can edit this file at runtime and any change will be reloaded and be effective immediately.</p><h3 id="Configuringtheappenders">Configuring the appenders</h3><p>The default logging configuration defines three appenders:</p><ul><li>the <tt>stdout</tt> console appender is disabled by default. If you plan to run Karaf in server mode only (i.e. with the locale console disabled), you can turn on this appender on by adding it to the list of configured appenders using the <tt>log4j.rootLogger</tt> property</li><li>the <tt>out</tt> appender is the one enabled by default. It logs events to a number of rotating log files of a fixed size. You can easily change the parameters to control the number of files using <tt>maxBackupIndex</tt> and their size size <tt>maxFileSize</tt></li><li>the <tt>sift</tt> appender can be used instead to provide a per-bundle log file. The default configuration uses the bundle symbolic name as the file name to log to</li></ul><h3 id="Changingt heloglevels">Changing the log levels</h3><p>The default logging configuration sets the logging levels so that the log file will provide enough information to monitor the behavior of the runtime and provide clues about what caused a problem. However, the default configuration will not provide enough information to debug most problems.</p><p>The most useful logger to change when trying to debug an issue with Karaf is the root logger. You will want to set its logging level to <tt>DEBUG</tt> in the <tt>org.ops4j.pax.logging.cfg</tt> file.</p><div class="syntax"><div class="highlight"><pre>log4j.rootLogger=DEBUG, out, osgi:VmLogAppender
...
</pre></div>
</div><p>When debugging a problem in Karaf you may want to change the level of logging information that is displayed on the console. The example below shows how to set the root logger to <tt>DEBUG</tt> but limiting the information displayed on the console to WARN.</p><div class="syntax"><div class="highlight"> <pre>log4j.rootLogger=DEBUG, out, stdout, osgi:VmLogAppender
log4j.appender.stdout.threshold=WARN
...
</pre></div>
</div><h2 id="ConsoleLogCommands">Console Log Commands</h2><p>The log subshell comes with the following commands:</p><ul><li><a href="../commands/log-clear.html"><tt>log:clear</tt></a>: clear the log</li><li><a href="../commands/log-display.html"><tt>log:display</tt></a>: display the last log entries</li><li><a href="../commands/log-display-exception.html"><tt>log:display-exception</tt></a>: display the last exception from the log</li><li><a href="../commands/log-get.html"><tt>log:get</tt></a>: show the log levels</li><li><a href="../commands/log-set.html"><tt>log:set</tt></a>: set the log levels</li><li><a href="../commands/log-tail.html"><tt>log:tail</tt></a>: continuous display of the log entries</li></ul><p>For example, if you want to debug something, you might want to run the following commands:</p><pre> > log:set DEBUG ... do something ... > log:display </pre><p>Note that the log levels set using the <tt>log:set</tt> commands are not persistent and will be lost upon restart.<br/>To configure those in a persistent way, you should edit the configuration file mentioned above using the config commands or directly using a text editor of your choice.</p><p>The log commands has a separate configure file:</p><pre> [karaf_install_dir]/etc/org.apache.karaf.log.cfg -</pre><h2 id="JMX">JMX</h2><p>Karaf provides a Log MBean (org.apache.karaf:type=log) providing quite the same actions that can be performed using<br/>the log:* shell commands.</p><h2 id="Advancedconfiguration">Advanced configuration</h2><p>The logging backend uses Log4j, but offer a number of additional features.</p><h3 id="Nestedfiltersappendersanderrorhandlers">Nested filters, appenders and error handlers</h3><h4 id="Filters">Filters</h4><p>Appender filters can be added using the following syntax:</p><div class="syntax"><pre name='code' class='brush: text; gutter: false;'><code> -log4j.appender.[appender-name].filter.[filter-name]=[filter-class] -log4j.appender.[appender-name].filter.[filter-name].[option]=[value]</code></pre></div><p>Below is a real example:</p><div class="syntax"><pre name='code' class='brush: text; gutter: false;'><code> -log4j.appender.out.filter.f1=org.apache.log4j.varia.LevelRangeFilter -log4j.appender.out.filter.f1.LevelMax=FATAL -log4j.appender.out.filter.f1.LevelMin=DEBUG</code></pre></div><h4 id="Nestedappenders">Nested appenders</h4><p>Nested appenders can be added using the following syntax:</p><div class="syntax"><pre name='code' class='brush: text; gutter: false;'><code> -log4j.appender.[appender-name].appenders=[comma-separated-list-of-appender-names]</code></pre></div><p>Below is a real example:</p><div class="syntax"><pre name='code' class='brush: text; gutter: false;'><code> -log4j.appender.async=org.apache.log4j.AsyncAppender -log4j.appender.async.appenders=jms - -log4j.appender.jms=org.apache.log4j.net.JMSAppender -...</code></pre></div><h4 id="Errorhandlers">Error handlers</h4><p>Error handlers can be added using the following syntax:</p><div class="syntax"><pre name='code' class='brush: text; gutter: false;'><code> -log4j.appender.[appender-name].errorhandler=[error-handler-class] -log4j.appender.[appender-name].errorhandler.root-ref=[true|false] -log4j.appender.[appender-name].errorhandler.logger-ref=[logger-ref] -log4j.appender.[appender-name].errorhandler.appender-ref=[appender-ref]</code></pre></div><h3 id="OSGispecificMDCattributes">OSGi specific MDC attributes</h3><p>Pax-Logging provides the following attributes by default:</p><ul><li><tt>bundle.id</tt>: the id of the bundle from which the class is loaded</li><li><tt>bundle.name</tt>: the symbolic-name of the bundle</li><li><tt>bundle.version</tt>: the version of the bundle</li></ul><p>An MDC sifting appender is available to split the log events based on MDC attributes. Below is a configuration example for this appender:</p><div class="syntax"><pre name='code' class='brush: text; gutter: false;'><code> -log4j.appender.sift=org.apache.log4j.sift.MDCSiftingAppender -log4j.appender.sift.key=bundle.name -log4j.appender.sift.default=karaf -log4j.appender.sift.appender=org.apache.log4j.FileAppender -log4j.appender.sift.appender.layout=org.apache.log4j.PatternLayout -log4j.appender.sift.appender.layout.ConversionPattern=%d{ABSOLUTE} | %-5.5p | %-16.16t | %-32.32c{1} | %-32.32C %4L | %m%n -log4j.appender.sift.appender.file=${karaf.data}/log/$\\{bundle.name\\}.log -log4j.appender.sift.appender.append=true</code></pre></div><h3 id="EnhancedOSGistacktracerenderer">Enhanced OSGi stack trace renderer</h3><p>This renderer is configured by default in Karaf and will give additional informations when printing stack traces.<br/>For each line of the stack trace, it will display OSGi specific informations related to the class on that line: the bundle id, the bundle symbolic name and the bundle version. This information can greatly help diagnosing problems in some cases.<br/>The information is appended at the end of each line in the following format <tt><a href="id:name:version">id:name:version</a></tt> as shown below</p><div class="syntax"><pre name='code' class='brush: text; gutter: false;'><code> -java.lang.IllegalArgumentException: Command not found: *:foo - at org.apache.felix.gogo.runtime.shell.Closure.execute(Closure.java:225)[21:org.apache.karaf.shell.console:2.1.0] - at org.apache.felix.gogo.runtime.shell.Closure.executeStatement(Closure.java:162)[21:org.apache.karaf.shell.console:2.1.0] - at org.apache.felix.gogo.runtime.shell.Pipe.run(Pipe.java:101)[21:org.apache.karaf.shell.console:2.1.0] - at org.apache.felix.gogo.runtime.shell.Closure.execute(Closure.java:79)[21:org.apache.karaf.shell.console:2.1.0] - at org.apache.felix.gogo.runtime.shell.CommandSessionImpl.execute(CommandSessionImpl.java:71)[21:org.apache.karaf.shell.console:2.1.0] - at org.apache.karaf.shell.console.jline.Console.run(Console.java:169)[21:org.apache.karaf.shell.console:2.1.0] - at java.lang.Thread.run(Thread.java:637)[:1.6.0_20]</code></pre></div><h3 id="Usingyourownappenders">Using your own appenders</h3><p>If you plan to use your own appenders, you need to create an OSGi bundle and attach it as a fragment to the bundle with a symbolic name of <br/><tt>org.ops4j.pax.logging.pax-logging-service</tt>. This way, the underlying logging system will be able to see and use your appenders.</p><p>So for example you write a log4j appender:<br/>class MyAppender extends AppenderSkeleton {<br/>...<br/>}</p><p>Then you need to package the appender in a jar with a Manifest like this:</p><p>Manifest:<br/>Bundle-SymbolicName: org.mydomain.myappender <br/>Fragment-Host: org.ops4j.pax.logging.pax-logging-service<br/>...</p><p>Copy the new appender fragment into the ${karaf.home}/system directory. Karaf uses a virtual maven repository to access resources in the system<br/>directory, so the jar path should use the standard maven groupId/artifactId/version/ con vention, where the groupId is a directory structure.</p><p>Edit ${karaf.home}/etc/startup.properties and add the new fragment bundle to the list before the pax-logging-service bundle.</p><p>Restart karaf with a clean run to reload the system bundles, and now you can use the appender in your log4j config file like shown in the config<br/>examples above.</p> +</pre><h2 id="JMX">JMX</h2><p>Karaf provides a Log MBean (org.apache.karaf:type=log) providing quite the same actions that can be performed using<br/>the log:* shell commands.</p><h2 id="Advancedconfiguration">Advanced configuration</h2><p>The logging backend uses Log4j, but offer a number of additional features.</p><h3 id="Nestedfiltersappendersanderrorhandlers">Nested filters, appenders and error handlers</h3><h4 id="Filters">Filters</h4><p>Appender filters can be added using the following syntax:</p><div class="syntax"><div class="highlight"><pre>log4j.appender.[appender-name].filter.[filter-name]=[filter-class]
log4j.appender.[appender-name].filter.[filter-name].[option]=[value]
</pre></div>
</div><p>Below is a real example:</p><div class="syntax"><div class="highlight"><pre>log4j.appender.out.filter.f1=org.apache.log4j.varia.LevelRangeFilter
log4j.appender.out.filter.f1.LevelMax=FATAL
log4j.appender.out.filter.f1.LevelMin=DEBUG
 </pre></div>
</div><h4 id="Nestedappenders">Nested appenders</h4><p>Nested appenders can be added using the following syntax:</p><div class="syntax"><div class="highlight"><pre>log4j.appender.[appender-name].appenders=[comma-separated-list-of-appender-names]
</pre></div>
</div><p>Below is a real example:</p><div class="syntax"><div class="highlight"><pre>log4j.appender.async=org.apache.log4j.AsyncAppender
log4j.appender.async.appenders=jms

log4j.appender.jms=org.apache.log4j.net.JMSAppender
...
</pre></div>
</div><h4 id="Errorhandlers">Error handlers</h4><p>Error handlers can be added using the following syntax:</p><div class="syntax"><div class="highlight"><pre>log4j.appender.[appender-name].errorhandler=[error-handler-class]
log4j.appender.[appender-name].errorhandler.root-ref=[true|false]
log4j.appender.[appender-name].errorhandler.logger-ref=[logger-ref]
log4j.appender.[appender-name].er rorhandler.appender-ref=[appender-ref]
</pre></div>
</div><h3 id="OSGispecificMDCattributes">OSGi specific MDC attributes</h3><p>Pax-Logging provides the following attributes by default:</p><ul><li><tt>bundle.id</tt>: the id of the bundle from which the class is loaded</li><li><tt>bundle.name</tt>: the symbolic-name of the bundle</li><li><tt>bundle.version</tt>: the version of the bundle</li></ul><p>An MDC sifting appender is available to split the log events based on MDC attributes. Below is a configuration example for this appender:</p><div class="syntax"><div class="highlight"><pre>log4j.appender.sift=org.apache.log4j.sift.MDCSiftingAppender
log4j.appender.sift.key=bundle.name
log4j.appender.sift.default=karaf
log4j.appender.sift.appender=org.apache.log4j.FileAppender
log4j.appender.sift.appender.layout=org.apache.log4j.PatternLayout
log4j.appender.sift.appender.layout.ConversionPattern=%d{ABSOLUTE} | %-5.5p | %-16.16t | % -32.32c{1} | %-32.32C %4L | %m%n
log4j.appender.sift.appender.file=${karaf.data}/log/$\\{bundle.name\\}.log
log4j.appender.sift.appender.append=true
</pre></div>
</div><h3 id="EnhancedOSGistacktracerenderer">Enhanced OSGi stack trace renderer</h3><p>This renderer is configured by default in Karaf and will give additional informations when printing stack traces.<br/>For each line of the stack trace, it will display OSGi specific informations related to the class on that line: the bundle id, the bundle symbolic name and the bundle version. This information can greatly help diagnosing problems in some cases.<br/>The information is appended at the end of each line in the following format <tt><a href="id:name:version">id:name:version</a></tt> as shown below</p><div class="syntax"><div class="highlight"><pre>java.lang.IllegalArgumentException: Command not found: *:foo
 at org.apache.felix.gogo.runtime.shell.Closure.execute(Closure.java:225)[21: org.apache.karaf.shell.console:2.1.0]
 at org.apache.felix.gogo.runtime.shell.Closure.executeStatement(Closure.java:162)[21:org.apache.karaf.shell.console:2.1.0]
 at org.apache.felix.gogo.runtime.shell.Pipe.run(Pipe.java:101)[21:org.apache.karaf.shell.console:2.1.0]
 at org.apache.felix.gogo.runtime.shell.Closure.execute(Closure.java:79)[21:org.apache.karaf.shell.console:2.1.0]
 at org.apache.felix.gogo.runtime.shell.CommandSessionImpl.execute(CommandSessionImpl.java:71)[21:org.apache.karaf.shell.console:2.1.0]
 at org.apache.karaf.shell.console.jline.Console.run(Console.java:169)[21:org.apache.karaf.shell.console:2.1.0]
 at java.lang.Thread.run(Thread.java:637)[:1.6.0_20]
</pre></div>
</div><h3 id="Usingyourownappenders">Using your own appenders</h3><p>If you plan to use your own appenders, you need to create an OSGi bundle and attach it as a fragment to the bundle with a symbolic name of <br/><tt>org.ops4j.pax.logging .pax-logging-service</tt>. This way, the underlying logging system will be able to see and use your appenders.</p><p>So for example you write a log4j appender:<br/>class MyAppender extends AppenderSkeleton {<br/>...<br/>}</p><p>Then you need to package the appender in a jar with a Manifest like this:</p><p>Manifest:<br/>Bundle-SymbolicName: org.mydomain.myappender <br/>Fragment-Host: org.ops4j.pax.logging.pax-logging-service<br/>...</p><p>Copy the new appender fragment into the ${karaf.home}/system directory. Karaf uses a virtual maven repository to access resources in the system<br/>directory, so the jar path should use the standard maven groupId/artifactId/version/ convention, where the groupId is a directory structure.</p><p>Edit ${karaf.home}/etc/startup.properties and add the new fragment bundle to the list before the pax-logging-service bundle.</p><p>Restart karaf with a clean run to reload the system bundles, and now you can use the appender in your log4j confi g file like shown in the config<br/>examples above.</p> </div> </td> </tr> Modified: karaf/site/production/manual/latest/users-guide/migration.html URL: http://svn.apache.org/viewvc/karaf/site/production/manual/latest/users-guide/migration.html?rev=1484249&r1=1484248&r2=1484249&view=diff ============================================================================== --- karaf/site/production/manual/latest/users-guide/migration.html (original) +++ karaf/site/production/manual/latest/users-guide/migration.html Sun May 19 09:53:10 2013 @@ -93,7 +93,7 @@ <div id="wrapper-menu-page-top"> <div id="wrapper-menu-page-bottom"> <div id="menu-page"> - <h3 id="Homeindex"><a href="../index.html">Home</a></h3><ul style="list-style: square"><li><a href="../overview.html">Overview</a></li><li><a href="../quick-start.html">Quick Start</a></li></ul><h3 id="UsersGuideusersguideindex"><a href="index.html">Users Guide</a></h3><ul style="list-style: square"><li><a href="installation.html">Installing Karaf</a></li><li><a href="directory-structure.html">Directory Structure</a></li><li><a href="start-stop.html">Starting and stopping Karaf</a></li><li><a href="wrapper.html">OS integration</a></li><li><a href="configuration.html">Configuration</a></li><li><a href="using-console.html">Using the console</a></li><li><a href="web-console.html">Web console</a></li><li><a href="remote-console.html">Remote console</a></li><li><a href="web-console.html">Web console</a></li><li><a href="deployer.html">Deployer</a></li><li><a href="child-instances.html">Child instances</a></li><li><a href="security.html">Security</a></li><l i><a href="failover.html">Failover Deployments</a></li><li><a href="logging-system.html">Logging system</a></li><li><a href="provisioning.html">Provisioning</a></li><li><a href="kar.html">KAR archive</a></li><li><a href="jre-tuning.html">JRE tuning</a></li><li><a href="web-applications.html">Web applications</a></li><li><a href="http.html">HTTP service</a></li><li><a href="jmx.html">JMX for monitoring and administration</a></li></ul><h3 id="DevelopersGuidedevelopersguideindex"><a href="../developers-guide/index.html">Developers Guide</a></h3><ul style="list-style: square"><li><a href="../developers-guide/connect-console.html">Programmatically connect to the Console</a></li><li><a href="../developers-guide/shell-syntax.html">Shell syntax</a></li><li><a href="../developers-guide/creating-bundles.html">Creating bundles</a></li><li><a href="../developers-guide/debugging.html">Troubleshooting, Debugging and Profiling</a></li><li><a href="../developers-guide/developer-command.html ">Developer Commands</a></li><li><a href="../developers-guide/archetypes.html">Maven Archetypes</a></li><li><a href="../developers-guide/extending-console.html">Extending the Console</a></li><li><a href="../developers-guide/branding-console.html">Branding the Console</a></li><li><a href="../developers-guide/karaf-maven-plugin.html">Using the Karaf Maven plugin</a></li><li><a href="../developers-guide/security-framework.html">Security Framework</a></li><li><a href="../developers-guide/custom-distribution.html">Custom Distribution</a></li><li><a href="../developers-guide/debugging.html">Troubleshooting, Debugging and Profiling</a></li><li><a href="../developers-guide/connect-console.html">Programmatically connect to the console</a></li><li><a href="../developers-guide/writing-tests.html">Writing integration tests</a></li><li><a href="../developers-guide/creating-bundles.html">Creating bundles</a></li><li><a href="../developers-guide/shell-syntax.html">Shell syntax</a></li><li> <a href="../developers-guide/github-contributions.html">Github Contributions</a></li></ul><h3 id="Commandscommandscommands"><a href="../commands/commands.html">Commands</a></h3> + <h3 id="Homeindex"><a href="../index.html">Home</a></h3><ul style="list-style: square"><li><a href="../overview.html">Overview</a></li><li><a href="../quick-start.html">Quick Start</a></li></ul><h3 id="UsersGuideusersguideindex"><a href="index.html">Users Guide</a></h3><ul style="list-style: square"><li><a href="installation.html">Installing Karaf</a></li><li><a href="directory-structure.html">Directory Structure</a></li><li><a href="start-stop.html">Starting and stopping Karaf</a></li><li><a href="wrapper.html">OS integration</a></li><li><a href="configuration.html">Configuration</a></li><li><a href="using-console.html">Using the console</a></li><li><a href="web-console.html">Web console</a></li><li><a href="remote-console.html">Remote console</a></li><li><a href="web-console.html">Web console</a></li><li><a href="deployer.html">Deployer</a></li><li><a href="child-instances.html">Child instances</a></li><li><a href="security.html">Security</a></li><l i><a href="failover.html">Failover Deployments</a></li><li><a href="logging-system.html">Logging system</a></li><li><a href="provisioning.html">Provisioning</a></li><li><a href="kar.html">KAR archive</a></li><li><a href="jre-tuning.html">JRE tuning</a></li><li><a href="web-applications.html">Web applications</a></li><li><a href="http.html">HTTP service</a></li><li><a href="jmx.html">JMX for monitoring and administration</a></li></ul><h3 id="DevelopersGuidedevelopersguideindex"><a href="../developers-guide/index.html">Developers Guide</a></h3><ul style="list-style: square"><li><a href="../developers-guide/connect-console.html">Programmatically connect to the Console</a></li><li><a href="../developers-guide/shell-syntax.html">Shell syntax</a></li><li><a href="../developers-guide/creating-bundles.html">Creating bundles</a></li><li><a href="../developers-guide/debugging.html">Troubleshooting, Debugging and Profiling</a></li><li><a href="../developers-guide/developer-commands.htm l">Developer Commands</a></li><li><a href="../developers-guide/archetypes.html">Maven Archetypes</a></li><li><a href="../developers-guide/extending-console.html">Extending the Console</a></li><li><a href="../developers-guide/branding-console.html">Branding the Console</a></li><li><a href="../developers-guide/karaf-maven-plugin.html">Using the Karaf Maven plugin</a></li><li><a href="../developers-guide/security-framework.html">Security Framework</a></li><li><a href="../developers-guide/custom-distribution.html">Custom Distribution</a></li><li><a href="../developers-guide/debugging.html">Troubleshooting, Debugging and Profiling</a></li><li><a href="../developers-guide/connect-console.html">Programmatically connect to the console</a></li><li><a href="../developers-guide/writing-tests.html">Writing integration tests</a></li><li><a href="../developers-guide/creating-bundles.html">Creating bundles</a></li><li><a href="../developers-guide/shell-syntax.html">Shell syntax</a></li><li ><a href="../developers-guide/github-contributions.html">Github >Contributions</a></li></ul><h3 id="Commandscommandscommands"><a >href="../commands/commands.html">Commands</a></h3> </div> </div> </div>
