logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vintem <vin...@gmail.com>
Subject Logging a specific package in log4j programmatically
Date Thu, 13 May 2010 17:29:38 GMT

Hi there,
here is the thing, I have to deploy a web app and the the log4j.properties
file is created by the client so I dont have control over it.
Their properties file is like this: 

log4j.rootCategory= FILE

!-----------FILE--------------!
log4j.category.FILE=DEBUG
log4j.appender.FILE=org.apache.log4j.RollingFileAppender
log4j.appender.FILE.File=${catalina.base}/logs/rcweb.log
log4j.appender.FILE.MaxFileSize=1024KB
log4j.appender.FILE.MaxBackupIndex=10
log4j.appender.FILE.layout=org.apache.log4j.PatternLayout
log4j.appender.FILE.layout.ConversionPattern=%-2d{dd/MM/yyyy HH:mm:ss} [%t]
%5p %c:%L - %m%n

And in my classes I do something like this:
private static final Logger LOG =
Logger.getLogger(MaterialController.class);
LOG.info("my log");

But the log file has never been created.

I did the test and changed the log4j.properties file and deployed in my
computer adding the following line:
log4j.logger.br.com.golive.requisicaoCompras=DEBUG

This works, but I cant use the file like this.

Is there any ideas?

Thanks
-- 
View this message in context: http://old.nabble.com/Logging-a-specific-package-in-log4j-programmatically-tp28550363p28550363.html
Sent from the Log4j - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Mime
View raw message