logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rpo...@apache.org
Subject svn commit: r1592221 - in /logging/log4j/log4j2/trunk/src: changes/changes.xml site/xdoc/manual/async.xml site/xdoc/manual/configuration.xml.vm
Date Sat, 03 May 2014 15:37:21 GMT
Author: rpopma
Date: Sat May  3 15:37:20 2014
New Revision: 1592221

URL: http://svn.apache.org/r1592221
Log:
LOG4J2-629 Document the system properties used in Log4J 2

Modified:
    logging/log4j/log4j2/trunk/src/changes/changes.xml
    logging/log4j/log4j2/trunk/src/site/xdoc/manual/async.xml
    logging/log4j/log4j2/trunk/src/site/xdoc/manual/configuration.xml.vm

Modified: logging/log4j/log4j2/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/src/changes/changes.xml?rev=1592221&r1=1592220&r2=1592221&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/src/changes/changes.xml (original)
+++ logging/log4j/log4j2/trunk/src/changes/changes.xml Sat May  3 15:37:20 2014
@@ -21,6 +21,9 @@
   </properties>
   <body>
     <release version="2.0-rc2" date="2014-MM-DD" description="Bug fixes and enhancements">
+      <action issue="LOG4J2-629" dev="rpopma" type="add">
+          Document the system properties used in Log4J 2.
+      </action>
       <action issue="LOG4J2-542" dev="rgoers" type="fix">
         Make Throwable transient in ThrowableProxy.
       </action>

Modified: logging/log4j/log4j2/trunk/src/site/xdoc/manual/async.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/src/site/xdoc/manual/async.xml?rev=1592221&r1=1592220&r2=1592221&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/src/site/xdoc/manual/async.xml (original)
+++ logging/log4j/log4j2/trunk/src/site/xdoc/manual/async.xml Sat May  3 15:37:20 2014
@@ -200,6 +200,7 @@
 				Some of these can be used to
 				tune logging performance.
 				</p>
+			<a name="SysPropsAllAsync" />
 				<table>
           <caption align="top">System Properties to configure all
             asynchronous loggers
@@ -391,6 +392,7 @@
 				Some of these can be used to
 				tune logging performance.
 				</p>
+			<a name="SysPropsMixedSync-Async" />
 				<table>
           <caption align="top">System Properties to configure mixed
             asynchronous and normal loggers

Modified: logging/log4j/log4j2/trunk/src/site/xdoc/manual/configuration.xml.vm
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/src/site/xdoc/manual/configuration.xml.vm?rev=1592221&r1=1592220&r2=1592221&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/src/site/xdoc/manual/configuration.xml.vm (original)
+++ logging/log4j/log4j2/trunk/src/site/xdoc/manual/configuration.xml.vm Sat May  3 15:37:20
2014
@@ -1136,6 +1136,310 @@ StatusConsoleListener listener = new Sta
           named file to be used during the test.
         </p>
         </subsection>
+        <a name="SystemProperties"/>
+        <subsection name="System Properties">
+        <p>
+          Below follows a number of system properties that can be used to control Log4j 2
behaviour.
+        </p>
+<table>
+  <caption align="top">Log4J-2.0 System Properties</caption>
+  <tr>
+    <th>System Property</th>
+    <th>Default Value</th>
+    <th>Description</th>
+  </tr>
+  <tr>
+    <td>log4j.configurationFile</td>
+    <td>&nbsp;</td>
+    <td>
+      Path to an XML or JSON Log4j 2 configuration file.
+    </td>
+  </tr>
+  <tr>
+    <td>Log4jContextSelector</td>
+    <td>ClassLoaderContextSelector</td>
+    <td>
+      Creates the <tt>LoggerContext</tt>s. An application can have one or more
active LoggerContexts depending
+      on the circumstances. 
+      See <a href="logsep.html">Log Separation</a> for more details.
+      Available context selector implementation classes:<br />
+      <tt>org.apache.logging.log4j.core.async.AsyncLoggerContextSelector</tt>
- makes <a href="async.html">all loggers asynchronous</a>.<br />
+      <tt>org.apache.logging.log4j.core.selector.BasicContextSelector</tt> -
creates a single shared LoggerContext.<br />
+      <tt>org.apache.logging.log4j.core.selector.ClassLoaderContextSelector</tt>
- separate LoggerContexts for each web application.<br />
+      <tt>org.apache.logging.log4j.core.selector.JNDIContextSelector</tt> - use
JNDI to locate each web application's LoggerContext.
+    </td>
+  </tr>
+  <tr>
+    <td>Log4jLogEventFactory</td>
+    <!-- deliberately inserted spaces to allow line break -->
+    <td>org.apache.logging .log4j.core.impl .DefaultLogEventFactory</td>
+    <td>
+      Factory class used by LoggerConfig to create <tt>LogEvent</tt> instances.
+      (Ignored when the <tt>AsyncLoggerContextSelector</tt> is used.)
+    </td>
+  </tr>
+  <tr>
+    <td>log4j2.loggerContextFactory</td>
+    <!-- deliberately inserted spaces to allow line break -->
+    <td>org.apache.logging .log4j.simple .SimpleLoggerContextFactory</td>
+    <td>
+      Factory class used by LogManager to bootstrap the logging implementation.
+      The core jar provides <tt>org.apache.logging.log4j.core.impl.Log4jContextFactory</tt>.
+    </td>
+  </tr>
+  <tr>
+    <td>log4j.configurationFactory</td>
+    <td>&nbsp;</td>
+    <td>
+      Fully specified class name of a class extending <tt>org.apache.logging.log4j.core.config.ConfigurationFactory</tt>.
+      If specified, an instance of this class is added to the list of configuration factories.
+    </td>
+  </tr>
+  <tr>
+    <td>log4j.Clock</td>
+    <td>SystemClock</td>
+    <td>
+      Implementation of the <tt>org.apache.logging.log4j.core.helpers.Clock</tt>
+      interface that is used for timestamping the log events.
+      <br />
+      By default, <tt>System.currentTimeMillis</tt> is called on every log event.
+      <br />
+      You can also specify a fully qualified class name of a custom class that implements
the
+      <tt>Clock</tt> interface.
+    </td>
+  </tr>
+  <tr>
+    <td>org.apache.logging.log4j.level</td>
+    <td>ERROR</td>
+    <td>
+      Log level of the default configuration. The default configuration is used if the ConfigurationFactory
+      could not successfully create a configuration (e.g. no log4j2.xml file was found).
+    </td>
+  </tr>
+  
+  <tr>
+    <td>disableThreadContext</td>
+    <td>false</td>
+    <td>
+      If <tt>true</tt>, the ThreadContext stack and map are disabled.
+      (May be ignored if a custom ThreadContext map is specified.)
+    </td>
+  </tr>
+  <tr>
+    <td>disableThreadContextStack</td>
+    <td>false</td>
+    <td>
+      If <tt>true</tt>, the ThreadContext stack is disabled.
+    </td>
+  </tr>
+  <tr>
+    <td>disableThreadContextMap</td>
+    <td>false</td>
+    <td>
+      If <tt>true</tt>, the ThreadContext map is disabled.
+      (May be ignored if a custom ThreadContext map is specified.)
+    </td>
+  </tr>
+  <tr>
+    <td>log4j2.threadContextMap</td>
+    <td>&nbsp;</td>
+    <td>
+      Fully specified class name of a custom <tt>ThreadContextMap</tt> implementation
class.
+    </td>
+  </tr>
+  <tr>
+    <td>isThreadContextMapInheritable</td>
+    <td>false</td>
+    <td>
+      If <tt>true</tt> use a <tt>InheritableThreadLocal</tt> to implement
the ThreadContext map.
+      Otherwise, use a plain <tt>ThreadLocal</tt>.
+      (May be ignored if a custom ThreadContext map is specified.)
+    </td>
+  </tr>
+  <tr>
+    <td>log4j2.disable.jmx</td>
+    <td>false</td>
+    <td>
+      If <tt>true</tt>, Log4j configuration objects like LoggerContexts, Appenders,
Loggers, etc.
+      will not be instrumented with MBeans and cannot be remotely monitored and managed.
+    </td>
+  </tr>
+  <tr>
+    <td>log4j.skipJansi</td>
+    <td>false</td>
+    <td>
+      If <tt>true</tt>, the ConsoleAppender will not try to use the Jansi output
stream on Windows.
+    </td>
+  </tr>
+  <tr>
+    <td>log4j.ignoreTCL</td>
+    <td>true</td>
+    <td>
+      If <tt>true</tt>, classes are only loaded with the default class loader.
+      Otherwise, an attempt is made to load classes with the current thread's context class
loader
+      before falling back to the default class loader.
+    </td>
+  </tr>
+  <tr>
+    <td>org.apache.logging.log4j.uuidSequence</td>
+    <td>0</td>
+    <td>
+      System property that may be used to seed the UUID generation with an integer value.
+    </td>
+  </tr>
+  <!--
+  <tr>
+    <td>org.apache.logging.log4j.assignedSequences</td>
+    <td>true</td>
+    <td>
+      TODO: used to seed UUID generation. Not sure when or why one would use this...
+    </td>
+  </tr>
+  -->
+  <tr>
+    <!-- deliberately inserted spaces to allow line break -->
+    <td>org.apache.logging.log4j.simplelog .showContextMap</td>
+    <td>false</td>
+    <td>If <tt>true</tt>, the full ThreadContext map is included in each
SimpleLogger log message.</td>
+  </tr>
+  <tr>
+    <!-- deliberately inserted spaces to allow line break -->
+    <td>org.apache.logging.log4j.simplelog .showlogname</td>
+    <td>false</td>
+    <td>If <tt>true</tt>, the logger name is included in each SimpleLogger
log message.</td>
+  </tr>
+  <tr>
+    <!-- deliberately inserted spaces to allow line break -->
+    <td>org.apache.logging.log4j.simplelog .showShortLogname</td>
+    <td>true</td>
+    <td>If <tt>true</tt>, only the last component of a logger name is included
in SimpleLogger log messages.
+    (E.g., if the logger name is "mycompany.myproject.mycomponent", only "mycomponent" is
logged.
+    </td>
+  </tr>
+  <tr>
+    <!-- deliberately inserted spaces to allow line break -->
+    <td>org.apache.logging.log4j.simplelog .showdatetime</td>
+    <td>false</td>
+    <td>If <tt>true</tt>, SimpleLogger log messages contain timestamp information.
+    </td>
+  </tr>
+  <tr>
+    <!-- deliberately inserted spaces to allow line break -->
+    <td>org.apache.logging.log4j.simplelog .dateTimeFormat</td>
+    <td>"yyyy/MM/dd HH:mm:ss:SSS zzz"</td>
+    <td>Date-time format to use.
+    Ignored if <tt>org.apache.logging.log4j.simplelog.showdatetime</tt> is <tt>false</tt>.
+    </td>
+  </tr>
+  <tr>
+    <!-- deliberately inserted spaces to allow line break -->
+    <td>org.apache.logging.logj..simplelog .logFile</td>
+    <td>system.err</td>
+    <td>"system.err" (case-insensitive) logs to System.err, 
+    "system.out" (case-insensitive) logs to System.out,
+    any other value is interpreted as a file name to save SimpleLogger messages to.
+    </td>
+  </tr>
+  <tr>
+    <!-- deliberately inserted spaces to allow line break -->
+    <td>org.apache.logging.log4j.simplelog .level</td>
+    <td>ERROR</td>
+    <td>Default level for new SimpleLogger instances.
+    </td>
+  </tr>
+  <tr>
+    <!-- deliberately inserted spaces to allow line break -->
+    <td>org.apache.logging.log4j.simplelog.&lt;loggerName&gt;level</td>
+    <td>SimpleLogger default log level</td>
+    <td>Log level for a the SimpleLogger instance with the specified name.</td>
+  </tr>
+  <tr>
+    <td>Log4jDefaultStatusLevel</td>
+    <td>ERROR</td>
+    <td>
+      The StatusLogger logs events that occur in the logging system to the console.
+      During configuration, AbstractConfiguration registers a StatusConsoleListener with
the StatusLogger that may
+      redirect status log events from the default console output to a file. 
+      The listener also supports fine-grained filtering.
+      This system property specifies the default status log level for the listener to use
if the configuration does not
+      specify a status level.
+    </td>
+  </tr>
+  <tr>
+    <td>log4j2.StatusLogger.level</td>
+    <td>WARN</td>
+    <td>
+      Default log level of the StatusLogger.
+      This is only used when there are no StatusLogger listeners and controls what is saved
in the buffer.
+    </td>
+  </tr>
+  <tr>
+    <td>log4j2.status.entries</td>
+    <td>200</td>
+    <td>
+      Number of StatusLogger events that are kept in a buffer and can be retrieved with
+      <tt>StatusLogger.getStatusData()</tt>.
+    </td>
+  </tr>
+  <tr>
+    <td>AsyncLogger.ExceptionHandler</td>
+    <td>&nbsp;
+    </td>
+    <td>
+      See <a href="async.html#SysPropsAllAsync">Async Logger System Properties</a>
for details.
+    </td>
+  </tr>
+  <tr>
+    <td>AsyncLogger.RingBufferSize</td>
+    <td>256&#160;*&#160;1024</td>
+    <td>
+      See <a href="async.html#SysPropsAllAsync">Async Logger System Properties</a>
for details.
+    </td>
+  </tr>
+  <tr>
+    <td>AsyncLogger.WaitStrategy</td>
+    <td>
+      Sleep
+    </td>
+    <td>
+      See <a href="async.html#SysPropsAllAsync">Async Logger System Properties</a>
for details.
+    </td>
+  </tr>
+  <tr>
+    <td>AsyncLogger.ThreadNameStrategy</td>
+    <td>
+      CACHED
+    </td>
+    <td>
+      See <a href="async.html#SysPropsAllAsync">Async Logger System Properties</a>
for details.
+    </td>
+  </tr>
+  <tr>
+    <td>AsyncLoggerConfig.ExceptionHandler</td>
+    <td>&nbsp;    </td>
+    <td>
+      See <a href="async.html#SysPropsMixedSync-Async">Mixed Async/Synchronous Logger
System Properties</a> for details.
+    </td>
+  </tr>
+  <tr>
+    <td>AsyncLoggerConfig.RingBufferSize</td>
+    <td>256&#160;*&#160;1024</td>
+    <td>
+      See <a href="async.html#SysPropsMixedSync-Async">Mixed Async/Synchronous Logger
System Properties</a> for details.
+    </td>
+  </tr>
+  <tr>
+    <td>AsyncLoggerConfig.WaitStrategy</td>
+    <td>
+      Sleep
+    </td>
+    <td>
+      See <a href="async.html#SysPropsMixedSync-Async">Mixed Async/Synchronous Logger
System Properties</a> for details.
+    </td>
+  </tr>
+</table>
+
+        </subsection>
       </section>
     </body>
 </document>



Mime
View raw message