5 Replies Latest reply: Jan 20, 2012 11:49 AM by René van Wijk RSS

    How to specify wich ODL Handler to use

    606248
      Hi,

      I built a custom ODL Handler, but I can't make WLS to use it. which config files should I modify to achieve this?

      Thanks in advance.
      Neuquino
        • 1. Re: How to specify wich ODL Handler to use
          René van Wijk
          Does not really specify what you are looking for, but maybe it helps you on the way
          - http://docs.oracle.com/cd/E15523_01/upgrade.1111/e10126/wls_oc4j_comparisons.htm
          contains a small section 'Viewing Log Files for a Domain' that contains some notes on ODL and WebLogic
          • 2. Re: How to specify wich ODL Handler to use
            606248
            René,

            Thanks for your answer, but it is not what I'm looking for.

            The specific problem is that I have to log via UDP. So I created a Handler that transfer every LogReport via UDP. But I don't know how to configure WLS to use my handler instead of the ConsoleHandler or de FileHandler.

            Do you know where is that configuration? The steps I followed are:

            1) Copy my .jar with the handler in WL_HOME/server/lib
            2) Added my jar to WEBLOGIC_CLASSPATH in WL_HOME/common/bin/commEnv.sh
            3) Added the <log-handler> tag and used inside the root <logger> tag in DOMAIN_HOME/config/fmwconfig/servers/AdminServer/logging.xml as follow:

            <?xml version="1.0" encoding="UTF-8"?>
            <logging_configuration>
            *<log_handlers>*
            *<log_handler name='udp-handler' class='com.mycompany.oracle.logging.UDPSocketHandler' formatter='oracle.core.ojdl.weblogic.ConsoleFormatter' level='WARNING:32'>*
            *<property name="destinationAddress" value="192.168.0.48" />*
            *<property name="destinationPort" value="32075" />*
            *</log_handler>*

            <log_handler name='console-handler' class='oracle.core.ojdl.logging.ConsoleHandler' formatter='oracle.core.ojdl.weblogic.ConsoleFormatter' level='WARNING:32'/>

            <log_handler name='odl-handler' class='oracle.core.ojdl.logging.ODLHandlerFactory' filter='oracle.dfw.incident.IncidentDetectionLogFilter'>
            <property name='path' value='${domain.home}/servers/${weblogic.Name}/logs/${weblogic.Name}-diagnostic.log'/>
            <property name='maxFileSize' value='10485760'/>
            <property name='maxLogSize' value='104857600'/>
            <property name='encoding' value='UTF-8'/>
            <property name='useThreadName' value='true'/>
            <property name='supplementalAttributes' value='J2EE_APP.name,J2EE_MODULE.name,WEBSERVICE.name,WEBSERVICE_PORT.name,composite_instance_id,component_instance_id,composite_name,component_name'/>
            </log_handler>

            <log_handler name='wls-domain' class='oracle.core.ojdl.weblogic.DomainLogHandler' level="WARNING"/>

            <log_handler name='owsm-message-handler' class='oracle.core.ojdl.logging.ODLHandlerFactory'>
            <property name='path' value='${domain.home}/servers/${weblogic.Name}/logs/owsm/msglogging'/>
            <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'/>
            </log_handler>

            <log_handler name='em-log-handler' level='NOTIFICATION:32' class='oracle.core.ojdl.logging.ODLHandlerFactory' filter='oracle.dfw.incident.IncidentDetectionLogFilter'>
            <property name='path' value='${domain.home}/servers/${weblogic.Name}/sysman/log/emoms.log'/>
            <property name='format' value='ODL-Text'/>
            <property name='useThreadName' value='true'/>
            <property name='maxFileSize' value='5242880'/>
            <property name='maxLogSize' value='52428800'/>
            <property name='encoding' value='UTF-8'/>
            </log_handler>

            <log_handler name='em-trc-handler' level='TRACE:32' class='oracle.core.ojdl.logging.ODLHandlerFactory'>
            <property name='logreader:' value='off'/>
            <property name='path' value='${domain.home}/servers/${weblogic.Name}/sysman/log/emoms.trc'/>
            <property name='format' value='ODL-Text'/>
            <property name='useThreadName' value='true'/>
            <property name='locale' value='en'/>
            <property name='maxFileSize' value='5242880'/>
            <property name='maxLogSize' value='52428800'/>
            <property name='encoding' value='UTF-8'/>
            </log_handler>


            </log_handlers>

            <loggers>

            <logger name="" level="WARNING:1">
            <handler name="odl-handler"/>
            <handler name="wls-domain"/>
            <handler name="console-handler"/>
            *<handler name="udp-handler" />*
            </logger>

            <logger name="oracle" level="NOTIFICATION:1"/>

            <logger name="oracle.adf"/>
            <logger name="oracle.adf.desktopintegration"/>
            <logger name="oracle.adf.faces"/>
            <logger name="oracle.adf.controller"/>
            <logger name="oracle.adfinternal"/>
            <logger name="oracle.adfinternal.controller"/>
            <logger name="oracle.jbo"/>
            <logger name="oracle.adfdt"/>
            <logger name="oracle.adfdtinternal"/>

            <logger name="oracle.bam"/>
            <logger name="oracle.bam.adapter"/>
            <logger name="oracle.bam.common"/>
            <logger name="oracle.bam.system"/>
            <logger name="oracle.bam.middleware"/>
            <logger name="oracle.bam.adc.security"/>
            <logger name="oracle.bam.common.security"/>
            <logger name="oracle.bam.adc.ejb.BamAdcServerBean"/>
            <logger name="oracle.bam.reportcache.ejb.ReportCacheServerBean"/>
            <logger name="oracle.bam.eventengine.ejb.EventEngineServerBean"/>
            <logger name="oracle.bam.ems.ejb.EMSServerBean"/>
            <logger name="oracle.bam.adc.api"/>
            <logger name="oracle.bam.adc"/>
            <logger name="oracle.bam.eventengine"/>
            <logger name="oracle.bam.ems"/>
            <logger name="oracle.bam.webservices"/>
            <logger name="oracle.bam.web"/>
            <logger name="oracle.bam.reportcache"/>

            <logger name="oracle.bpm"/>
            <logger name="oracle.bpm.analytics"/>
            <logger name="oracle.integration"/>
            <logger name="oracle.integration.platform.blocks.cluster"/>
            <logger name="oracle.integration.platform.blocks.deploy.coordinator"/>
            <logger name="oracle.integration.platform.blocks.event.saq"/>
            <logger name="oracle.integration.platform.blocks.java"/>
            <logger name="oracle.integration.platform.faultpolicy"/>
            <logger name="oracle.integration.platform.testfwk"/>
            <logger name="oracle.soa"/>
            <logger name="oracle.soa.adapter"/>
            <logger name="oracle.soa.b2b"/>
            <logger name="oracle.soa.b2b.apptransport"/>
            <logger name="oracle.soa.b2b.engine"/>
            <logger name="oracle.soa.b2b.repository"/>
            <logger name="oracle.soa.b2b.transport"/>
            <logger name="oracle.soa.b2b.ui"/>
            <logger name="oracle.soa.bpel"/>
            <logger name="oracle.soa.bpel.console"/>
            <logger name="oracle.soa.bpel.engine"/>
            <logger name="oracle.soa.bpel.engine.activation"/>
            <logger name="oracle.soa.bpel.engine.agents"/>
            <logger name="oracle.soa.bpel.engine.bpel"/>
            <logger name="oracle.soa.bpel.engine.compiler"/>
            <logger name="oracle.soa.bpel.engine.data"/>
            <logger name="oracle.soa.bpel.engine.delivery"/>
            <logger name="oracle.soa.bpel.engine.deployment"/>
            <logger name="oracle.soa.bpel.engine.dispatch"/>
            <logger name="oracle.soa.bpel.engine.sensor"/>
            <logger name="oracle.soa.bpel.engine.translation"/>
            <logger name="oracle.soa.bpel.engine.ws"/>
            <logger name="oracle.soa.bpel.engine.xml"/>
            <logger name="oracle.soa.bpel.entity"/>
            <logger name="oracle.soa.bpel.jpa"/>
            <logger name="oracle.soa.bpel.system"/>
            <logger name="oracle.soa.dvm"/>
            <logger name="oracle.soa.management.facade.api"/>
            <logger name="oracle.soa.mediator"/>
            <logger name="oracle.soa.mediator.common"/>
            <logger name="oracle.soa.mediator.common.cache"/>
            <logger name="oracle.soa.mediator.common.error"/>
            <logger name="oracle.soa.mediator.common.error.recovery"/>
            <logger name="oracle.soa.mediator.common.message"/>
            <logger name="oracle.soa.mediator.dispatch"/>
            <logger name="oracle.soa.mediator.dispatch.resequencer.toplink"/>
            <logger name="oracle.soa.mediator.filter"/>
            <logger name="oracle.soa.mediator.instance"/>
            <logger name="oracle.soa.mediator.management"/>
            <logger name="oracle.soa.mediator.metadata"/>
            <logger name="oracle.soa.mediator.monitor"/>
            <logger name="oracle.soa.mediator.resequencer"/>
            <logger name="oracle.soa.mediator.resequencer.besteffort"/>
            <logger name="oracle.soa.mediator.resequencer.fifo"/>
            <logger name="oracle.soa.mediator.resequencer.standard"/>
            <logger name="oracle.soa.mediator.service"/>
            <logger name="oracle.soa.mediator.serviceEngine"/>
            <logger name="oracle.soa.mediator.transformation"/>
            <logger name="oracle.soa.mediator.utils"/>
            <logger name="oracle.soa.mediator.validation"/>
            <logger name="oracle.soa.scheduler"/>
            <logger name="oracle.soa.services.common"/>
            <logger name="oracle.soa.services.identity"/>
            <logger name="oracle.soa.services.notification"/>
            <logger name="oracle.soa.services.rules"/>
            <logger name="oracle.soa.services.rules.obrtrace"/>
            <logger name="oracle.soa.services.workflow"/>
            <logger name="oracle.soa.services.workflow.common"/>
            <logger name="oracle.soa.services.workflow.evidence"/>
            <logger name="oracle.soa.services.workflow.metadata"/>
            <logger name="oracle.soa.services.workflow.persistency"/>
            <logger name="oracle.soa.services.workflow.query"/>
            <logger name="oracle.soa.services.workflow.report"/>
            <logger name="oracle.soa.services.workflow.runtimeconfig"/>
            <logger name="oracle.soa.services.workflow.soa"/>
            <logger name="oracle.soa.services.workflow.task"/>
            <logger name="oracle.soa.services.workflow.task.dispatch"/>
            <logger name="oracle.soa.services.workflow.task.routing"/>
            <logger name="oracle.soa.services.workflow.user"/>
            <logger name="oracle.soa.services.workflow.verification"/>
            <logger name="oracle.soa.services.workflow.worklist"/>
            <logger name="oracle.soa.services.workflow.performance"/>
            <logger name="oracle.soa.services.cmds"/>
            <logger name="oracle.soa.wsif"/>
            <logger name="oracle.soa.xref"/>

            <logger name="oracle.ucs"/>
            <logger name="oracle.sdp"/>
            <logger name="oracle.sdpinternal"/>
            <logger name="oracle.sdp.messaging"/>
            <logger name="oracle.sdp.messaging.client"/>
            <logger name="oracle.sdp.messaging.driver"/>
            <logger name="oracle.sdp.messaging.engine"/>
            <logger name="oracle.sdp.messaging.parlayx"/>
            <logger name="oracle.sdp.messaging.server"/>

            <logger name="oracle.wsm"/>

            <logger name="oracle.wsm.msg.logging" level="NOTIFICATION:1" useParentHandlers="false">
            <handler name="owsm-message-handler"/>
            <handler name="wls-domain"/>
            </logger>

            <logger name='oracle.sysman' level='NOTIFICATION:32' useParentHandlers='false'>
            <handler name='em-log-handler'/>
            <handler name='em-trc-handler'/>
            </logger>

            </loggers>
            </logging_configuration>
            • 3. Re: How to specify wich ODL Handler to use
              René van Wijk
              There is a note here - http://docs.oracle.com/cd/E15523_01/core.1111/e10105/logs.htm#CHDGGAJB
              "Oracle WebLogic Server does not use the ODL format. For information about the Oracle WebLogic Server log format..."

              Information on configure the logging in WebLogic is provided here - http://docs.oracle.com/cd/E15523_01/web.1111/e13739/config_logs.htm#i1012763

              Looking at your configuration, maybe you need to define a logger, such as - logger name="oracle.adf" - but then one with your application packages.
              Not sure about this, just a hunch.
              • 4. Re: How to specify wich ODL Handler to use
                606248
                Thank you, René. I enabled log4j support, but the only thing is missing in that docs is where do I put my log4j.properties file or where do I specify the log4j.properties location.
                • 5. Re: How to specify wich ODL Handler to use
                  René van Wijk
                  An example is given here: http://ananthkannan.blogspot.com/2009/09/how-to-configure-log4j-in-weblogic.html

                  and an old discussion: How to use log4j into weblogic 10.3