(Adventures in) ADF Logging in 12c
By Duncan Mills-Oracle on Jul 30, 2013
An offline conversation with Andrejus Baranovskis the other day alerted me to a difference in behavior with the ADF Logger in 12.1.2. It seems that the logging output is not being output to the console as it was in 11g, although it's certainly being written to the log file OK.
I did a little testing and digging on this, and the issue it turns out is pretty simple.
The root cause is in the default definition of the console hander in the logging.xml file. In 11g, this handler is configured to let everything through level="ALL". In 12c the default configuration is only to pass more significant issues through to the console level="WARNING:32". The reason for this change is, I'm guessing to reduce the amount of general noise that you see when WebLogic is started.
So it's trivial to switch back to the verboseness of 11g if you'd like to:
- From the console choose Actions --> Configure Oracle Diagnostic Logging to open the logging.xml view
- Switch to source view and locate the <log_handler name='console-handler' ... entry
- Change the WARNING:32 value to ALL
If you are feeling more creative, and want the best of both worlds, you can of course define a second handler for the console with this more permissive value and assign that explicitly to just your loggers - then you can get the verbose output for your logging without everything else.
1. Define a custom handler
<log_handler name='demo-console-handler' class='oracle.core.ojdl.logging.ConsoleHandler' formatter='oracle.core.ojdl.weblogic.ConsoleFormatter' level="ALL"/>
2. Use the custom handler for your root logger:
<logger name="oracle.demo" level="FINEST" useParentHandlers='false'> <handler name='odl-handler'/> <handler name='wls-domain'/> <handler name='demo-console-handler'/> </logger>