Changeset - 3dc0598886da
[Not reviewed]
0 1 0
HanzZ - 13 years ago 2012-10-30 19:33:13
hanzz.k@gmail.com
Logging docs update
1 file changed with 20 insertions and 1 deletions:
0 comments (0 inline, 0 general)
docs/guide/logging.textile
Show inline comments
 
@@ -95,7 +95,7 @@ log4j.additivity.Component.XML=false
 

	
 
# Create new RollingFileAppender logger and set the file name
 
log4j.appender.XML=org.apache.log4j.RollingFileAppender
 
log4j.appender.XML.File=/var/log/spectrum2/${jid}/spectrum2.log
 
log4j.appender.XML.File=/var/log/spectrum2/${jid}/spectrum2_xml.log
 

	
 
# Set MaxFileSize. Log will be rotated automatically when this limit is reached
 
log4j.appender.XML.MaxFileSize=100000KB
 
@@ -107,6 +107,25 @@ log4j.appender.XML.layout=org.apache.log4j.PatternLayout
 
log4j.appender.XML.layout.ConversionPattern=%d %-5p %c: %m%n
 
</pre>
 

	
 
h3. Disable XML logging
 

	
 
<pre>
 
# We create two rootLoggers:
 
#   - "debug" is internal logger used by log4cxx
 
#   - "stdout" is name of our ConsoleAppender logger
 
log4j.rootLogger=debug, stdout
 

	
 
# Create new ConsoleAppender logger with custom PatternLayout
 
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
 

	
 
# Define the output pattern. Characters are mentioned here: http://logging.apache.org/log4cxx/apidocs/classlog4cxx_1_1_pattern_layout.html
 
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
 
log4j.appender.stdout.layout.ConversionPattern=%d %-5p %c: %m%n
 

	
 
# Disable XML category
 
log4j.category.Component.XML = OFF
 
</pre>
 

	
 
h3. Disable logging
 

	
 
To disable logging, you still *must have* one logger created (probably the ConsoleAppender), but you can set log4j.threshold = OFF to not log everything later:
0 comments (0 inline, 0 general)