You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4cxx-user@logging.apache.org by Isaac <ti...@gmail.com> on 2007/06/19 05:10:34 UTC

Need more information about configure log4cxx environment programmatically.

Hi,all:

In <<Short introduction to log4cxx>>, It's said "The log4cxx environment is fully 
configurable programmatically." Since I don't want to use configuration files,
could you give me some more details about HOW-TO configure log4cxx environment
programmatically? (I've searched the documentation and web but couldn't find yet.)

For example, If I want to configure as below, what should I do programmatically? Thanks!
-----------------------------------------------
log4j.rootLogger=debug, R
log4j.rootLogger.additivity=false

log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=./log/Output.log
log4j.appender.R.MaxFileSize=102400KB
# Keep one backup file
log4j.appender.R.MaxBackupIndex=5
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%d [%t] - %m%n

Any suggestions or references are appreciated!!
 				
--------------
Isaac
2007-06-19