per deployment logging configuration is lost after server restart
jaan Nov 5, 2013 4:39 AMHello,
I am using slf4j api with per-deployment logging configuration. Application is deployed as ear.
Server is EAP 6.1.
I have following issues:
1. Per deployment configuration is lost after server restart. I can see in the server.log that logging module finds my file with configuration, but only root logger from configuration file works.
The same issue is when the application is deployed on the server for the first time. I have to redeploy the ear (Replace in the web console), or remove it and add it again to force logging module to pick up all loggers configuration from the file.
It works this way even in the simple application with just two EJBs where one of them is a startup singleton.
2. Sometimes redeploing application does not work and only root logger configuration works (for more complex applications).
Sample configuration file (jboss-logging.properties) - after restart only ERROR level appears in the logs.
loggers=com.corporation, com.corporation.loggingtest.subpackage, javax.enterprise.resource.webcontainer.jsf.facelets.compiler logger.level=ERROR logger.useParentHandlers=false logger.handlers=FILE_MGMT,CONSOLE_MGMT logger.com.corporation.level=INFO logger.com.corporation.useParentHandlers=true logger.com.corporation.loggingtest.subpackage.level=DEBUG logger.com.corporation.loggingtest.subpackage.useParentHandlers=true logger.javax.enterprise.resource.webcontainer.jsf.facelets.compiler.level=ERROR logger.javax.enterprise.resource.webcontainer.jsf.facelets.compiler.useParentHandlers=false logger.javax.enterprise.resource.webcontainer.jsf.facelets.compiler.handlers=FILE_MGMT,CONSOLE_MGMT handler.FILE_MGMT=org.jboss.logmanager.handlers.PeriodicRotatingFileHandler handler.FILE_MGMT.level=DEBUG handler.FILE_MGMT.formatter=FILE_MGMT handler.FILE_MGMT.properties=autoFlush,append,fileName,suffix,enabled handler.FILE_MGMT.constructorProperties=fileName,append handler.FILE_MGMT.autoFlush=true handler.FILE_MGMT.append=true handler.FILE_MGMT.fileName=bla.log handler.FILE_MGMT.suffix=.yyyy-MM-dd handler.FILE_MGMT.enabled=true handler.CONSOLE_MGMT=org.jboss.logmanager.handlers.ConsoleHandler handler.CONSOLE_MGMT.level=INFO handler.CONSOLE_MGMT.formatter=CONSOLE_MGMT handler.CONSOLE_MGMT.properties=autoFlush,target,enabled handler.CONSOLE_MGMT.autoFlush=true handler.CONSOLE_MGMT.target=SYSTEM_OUT handler.CONSOLE_MGMT.enabled=true formatter.FILE_MGMT=org.jboss.logmanager.formatters.PatternFormatter formatter.FILE_MGMT.properties=pattern formatter.FILE_MGMT.constructorProperties=pattern formatter.FILE_MGMT.pattern=%d{yyyy-MM-dd HH\:mm\:ss,SSS} |%-5p |%-70.70c |%-30.30t |%X{requestID} |%s%E%n formatter.CONSOLE_MGMT=org.jboss.logmanager.formatters.PatternFormatter formatter.CONSOLE_MGMT.properties=pattern formatter.CONSOLE_MGMT.pattern=%d{yyyy-MM-dd HH\:mm\:ss,SSS} |%-5p |%-70.70c |%-30.30t |%X{requestID} |%s%E%n
Is it known issue? Or maybe there is a better way to configure logging?
BR
Andrzej