commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jasmin Mehta <Jasmin_Me...@nexweb.org>
Subject [Logging] : Can commons.logging be used without log4j
Date Mon, 09 Aug 2010 12:53:13 GMT
I am using OC4J 10.1.3.5.0 as my application server. Where I have more 
than one web applications using the same instance of OC4J. I have 
configured shared libraries and importing thru those web application. My 
apache commons is using log4j. 

The log4j has limitation that if its used as a shared library then it can 
initiate only one configuration. So my all we applications which shares 
the same instance are populating the logs into only one log file (the web 
app which deployed first in order), rather than individual / separate log 
files configured in the path of each of the application's 
log4j.properties.

So now, I would like to get rid of log4j usage and use only apache commons 
logging. But again apache commons logging won't print the logs without 
log4j. Is there any way I can avoid this dependency? May be 
commons-logging.properties  ? How do I configure for log path etc?

My current log4j.properties:

log4j.rootCategory=DEBUG,stdout,standardFile
log4j.configCheckDelay=900000
################################## CONSOLE 
######################################## 
log4j.appender.OJDL=oracle.core.ojdl.log4j.OracleAppender
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=[%d{dd MMM yyyy HH:mm:ss}] 
%-5p [%c{1}] %m%n
log4j.defaultInitOverride=true
################################## STANDARD FILE 
################################## 
log4j.appender.standardFile=org.apache.log4j.RollingFileAppender
log4j.appender.standardFile.File=D:\\VGCC\\log\\vgcc.log
log4j.appender.standardFile.MaxFileSize=1000KB
log4j.appender.standardFile.MaxBackupIndex=50
log4j.appender.standardFile.layout=org.apache.log4j.PatternLayout
log4j.appender.standardFile.layout.ConversionPattern=[%d{dd MMM yyyy 
HH:mm:ss}] %-5p [%c{1}] %m%n

Thanks
Jasmin
******************************************************************************
This email and any files transmitted with it are intended solely for 
the use of the individual or agency to whom they are addressed. 
If you have received this email in error please notify the Navy 
Exchange Service Command e-mail administrator. This footnote 
also confirms that this email message has been scanned for the
presence of computer viruses.

Thank You!            
******************************************************************************


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message