-
1. Re: Log file per bundle instead of one global log file
mielket Sep 4, 2009 8:21 AM (in response to unwired)I am not aware of a way to include a logging configuration into the bundle that would then write everything to a different log file.
However since SMX4 logging is based on Log4J, one possible solution could be to use per package level appenders defined in the etc/org.ops4j.pax.logging.cfg. So something similar to
log4j.logger.com.acme=DEBUG, XX log4j.appender.XX=org.apache.log4j.RollingFileAppender log4j.appender.XX.File=XX.log log4j.appender.XX.layout=org.apache.log4j.PatternLayout log4j.appender.XX.layout.ConversionPattern=%p %t %c - %m%n
The same logging would still go to the loggers defined in root but you will also appear in the configured XX.log file.
Not sure if that is sufficient for you.
-
2. Re: Log file per bundle instead of one global log file
unwired Sep 6, 2009 8:08 PM (in response to mielket)I was able to make the solution that you suggest work earlier but I am looking specifically for each bundle to have its own log4j.properties rather than having to edit the global file each time a new bundle is deployed.
pax logging has a dummy PropertyConfigurator in their log4j facade.
It would be a nice feature to have otherwise finding a log entry in a global file is quite painful.
-
3. Re: Log file per bundle instead of one global log file
mielket Sep 7, 2009 9:38 AM (in response to unwired)I raised ESB-862 to capture your request.