Reputation: 1342
I use log4j2 as my default logging, when I run my webapp with Wildfly, My logs get wrapped as an INFO like follows:
17:28:31,127 INFO [stdout] (default task-6) DEBUG 2015-10-15 17:28:31,127 za.co.manticore.core.aspect.cacing.CachingAspect - Entering Caching Aspect for method getApplicationMeta
This is causing my logs to be cluttered, as all my logs are logged as INFO. How can I configure Wildfly to not do this. I have done some googleing but could not find an answer that worked.
Upvotes: 1
Views: 730
Reputation: 1342
Ok you can configure Wildfly not to wrap your stdout and stderr logs. Run the following CLI commands
sh jboss-cli.sh --connect '/subsystem=logging/console-handler=JUST-PRINT:add(formatter="%s%E%n")'
sh jboss-cli.sh --connect '/subsystem=logging/logger=stderr:add(use-parent-handlers="false", handlers=[JUST-PRINT])'
sh jboss-cli.sh --connect '/subsystem=logging/logger=stdout:add(use-parent-handlers="false", handlers=[JUST-PRINT])'
Upvotes: 0
Reputation: 4305
I think, you should properly configure log4j2. It looks like currently it has console appender - try remove console appender from log4j2 config
Upvotes: 1