log4j configuration
Posted: Wed Apr 16, 2014 6:30 pm
Hey, Did you get a solution to configure the lo4j. I am usng 14.2 oxygen xml developer and need guidance in setting up the loggers. Any help is highly appreciated!!
Code: Select all
log4j.rootCategory= debug, R2
log4j.appender.R2=org.apache.log4j.RollingFileAppender
log4j.appender.R2.File=${user.home}/Desktop/oxygenLog/oxygen.log
log4j.appender.R2.MaxFileSize=12000KB
log4j.appender.R2.MaxBackupIndex=20
log4j.appender.R2.layout=org.apache.log4j.PatternLayout
log4j.appender.R2.layout.ConversionPattern=%r %p [ %t ] %c - %m%n
Oxygen is also available as a plugin for the Eclipse workbench so this particular advice was given in that context and does not have anything to do with your particular request.You said I could include log4j.properties file in my plugin lib directory but that does not seem to work.
Code: Select all
/**
* Logger for logging.
*/
private static Logger logger = Logger.getLogger("my.plugin.logger");
{
logger.removeAllAppenders();
logger.addAppender(new FileAppender(...)));
}