sahrom
asked on
log4j and common logger conversion to
I have a log4j file, and I would like to do the same with common logger
I am new to this and am not quite sure how to do it
I have the
commons-logging.properties
org.apache.commons.logging .Log=org.a pache.comm ons.loggin g.impl.Sim pleLog
and
simplelog.properties
set up - in the proper place, but am not sure how to it
-------------------------- ------
the log4J file is:
log4j.debug=true
log4j.configDebug= true
### set log levels - for more verbose logging change 'info' to 'debug' ###
#log4j.rootLogger=DEBUG, CONSOLE, IDLEFILE
#### First appender writes to console
### direct log messages to stdout ###
#log4j.appender.mmSTDOUT=o rg.apache. log4j.Cons oleAppende r
#log4j.appender.mmSTDOUT.l ayout=org. apache.log 4j.Pattern Layout
#log4j.appender.mmSTDOUT.l ayout.Conv ersionPatt ern=%d{ABS OLUTE} %5p %c{1}:%L - %m%n
### Modifying the jBoss Console Appender
log4j.appender.CONSOLE.Thr eshold= DEBUG
#### Second appender writes to a file
### direct messages to file idleServer.log ###
log4j.appender.mmFILE=org. apache.log 4j.Rolling FileAppend er
log4j.appender.mmFILE.File =c:/temp/i dleServer. log
log4j.appender.mmFILE.layo ut=org.apa che.log4j. PatternLay out
log4j.appender.mmILE.layou t.Conversi onPattern= %d{ABSOLUT E} %5p %c{1}:%L - %m%n
# Control the maximum log file size
log4j.appender.mmFILE.MaxF ileSize=50 0KB
# Archive log files (one backup file here)
log4j.appender.mmFILE.MaxB ackupIndex =5
log4j.appender.mmFILE.layo ut=org.apa che.log4j. PatternLay out
log4j.appender.mmFILE.layo ut.Convers ionPattern =%L: %r [%t][%d] %-5p %c %x - %m%n:
I am new to this and am not quite sure how to do it
I have the
commons-logging.properties
org.apache.commons.logging
and
simplelog.properties
set up - in the proper place, but am not sure how to it
--------------------------
the log4J file is:
log4j.debug=true
log4j.configDebug= true
### set log levels - for more verbose logging change 'info' to 'debug' ###
#log4j.rootLogger=DEBUG, CONSOLE, IDLEFILE
#### First appender writes to console
### direct log messages to stdout ###
#log4j.appender.mmSTDOUT=o
#log4j.appender.mmSTDOUT.l
#log4j.appender.mmSTDOUT.l
### Modifying the jBoss Console Appender
log4j.appender.CONSOLE.Thr
#### Second appender writes to a file
### direct messages to file idleServer.log ###
log4j.appender.mmFILE=org.
log4j.appender.mmFILE.File
log4j.appender.mmFILE.layo
log4j.appender.mmILE.layou
# Control the maximum log file size
log4j.appender.mmFILE.MaxF
# Archive log files (one backup file here)
log4j.appender.mmFILE.MaxB
log4j.appender.mmFILE.layo
log4j.appender.mmFILE.layo
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.