dcsimg
About log4j.properties file
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   da_shan
Posted On:   Monday, October 18, 2004 11:02 AM

For example, there is an example property file displayed as the following: log4j.rootCategory=INFO, test log4j.appender.test=org.apache.log4j.RollingFileAppender log4j.appender.test.MaxFileSize=10MB log4j.appender.test.MaxBackupIndex=1 log4j.appender.test.File=/local/pkg/logs/test.log log4j.appender.test.Append=true log4j.appender.test.layout=org.apache.log4j.PatternLayout log4j.appender.test.layout.ConversionPattern=%d{yyyy.MM.dd, HH:mm:ss} - %m%n At the first line, after "INFO", a string "test", could someone tell what this String "test" mean please? It seems to me that we could name whatever String we want h   More>>

For example, there is an example property file displayed as the following:


log4j.rootCategory=INFO, test

log4j.appender.test=org.apache.log4j.RollingFileAppender

log4j.appender.test.MaxFileSize=10MB

log4j.appender.test.MaxBackupIndex=1

log4j.appender.test.File=/local/pkg/logs/test.log

log4j.appender.test.Append=true

log4j.appender.test.layout=org.apache.log4j.PatternLayout

log4j.appender.test.layout.ConversionPattern=%d{yyyy.MM.dd, HH:mm:ss} - %m%n


At the first line, after "INFO", a string "test", could someone tell what this String "test" mean please? It seems to me that we could name whatever String we want here, is it true?

Thanks a lot!

   <<Less

Re: About log4j.properties file

Posted By:   Balakris_Subramaniam  
Posted On:   Monday, October 18, 2004 01:37 PM



The 'string 'test' is the definition of the group for that log4j entry.
Notice the log4j.appender.test, etc properties that come later.
If you change 'test' to be 'module' then the other properties should be renamed to log4j.appender.module, etc. to belong to the same logger group.

About | Sitemap | Contact