As with all things XML this enables the logs to be readily read, queried, etc. with any utility that is compatible with the ODL log format. The ASC log viewer is an example of this -- it renders the log files in a pretty easy to view form, and provides convenience functions such as searching, correlation, etc.
However, for us mere humans, all those extra tags tend to make the log files pretty verbose and difficult to read in realtime using a command like tail.
The ODL logging handler that OC4J uses luckily has an option that causes it to generate into a plain text form instead of the default XML form.
To configure it, you simply need to specify an additional property named "format" and set it to a value of "ODL-Text".
Here's an example of defining a new log_handler and directing it to log to the log.txt file, in text form, maintaining a max file size of 10MB:
<log_handler name="my-text-handler" class="oracle.core.ojdl.logging.ODLHandlerFactory">With the handler in place, you can then configure a logger to use your new handler as follows:
<property name="format" value="ODL-Text"/>
<property name="path" value="../log/oc4j/log.txt"/>
<property name="maxFileSize" value="10485760"/>
<property name="maxLogSize" value="104857600"/>
<property name="encoding" value="UTF-8"/>
<property name="supplementalAttributes" value="J2EE_APP.name,J2EE_MODULE.name,WEBSERVICE.name,WEBSERVICE_PORT.name"/>
<logger name="oracle" level="finer">At runtime the log.txt file will contain single line, plain text entries of the form:
[2008-06-26T11:40:59.343+09:30] [classloader] [TRACE]   [tid: 10] [ecid: 10.187.112.202:83229:1214446259343:0,0] Ign
in /D:/java/oc4j-10134-dev/j2ee/home/config/server.xml entry: code-source /D:/java/oc4j-10134-dev/j2ee/home/jsp/lib/taglib/ojsputil.jar (from in /D:/java/oc4j-10134-dev/j2ee/home/config/server.xml) is already visible in the search path of global.tag.libraries:1.0.