Hi,
I am working on an enterprize application that is developed on Struts1.3 + EJB3.0 + Glassfish2.1.1.
The requirement is to route my application logs to a file that I have defined and all server specific logs should go to glassfish's default logger i.e. server.log.
I'm using log4j-1.2.15.jar and log4j.properties. The content of this property file is as --
-------------------------------------------------------------------------------
og4j.rootLogger=DEBUG, ROOT, CONSOLE log4j.appender.ROOT=org.apache.log4j.RollingFileAppender log4j.appender.ROOT.File=/appl/svc_elcpn/domains/elcpn_domain1/logs/SmartLog.log log4j.appender.ROOT.MaxFileSize=4000KB log4j.appender.ROOT.MaxBackupIndex=10
log4j.appender.ROOT.layout=org.apache.log4j.PatternLayout log4j.appender.ROOT.layout.ConversionPattern=[%d{MMM dd HH:mm:ss}] %-5p (%F:%L) - %m%n log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout log4j.appender.CONSOLE.layout.ConversionPattern=[%d{MMM dd HH:mm:ss}] %-5p (%F:%L) - %m%n
--------------------------------------------------------------------------------
Application logs are nicely going to SmartLog.log (My log file) but it is also going to server.log.
The question is how to block it going to server.log (the default log file)?
Regards, Naveen