WebLogic Logging Example

This example contains the source code for the WeblogicLogger.

Click the following link to download the sources for this example as ZIP file:

The WeblogicLogger is an example of how to integrate the IPP logging into the Weblogic native logging using the NonCatalogLogger API.

In order to enable the WeblogicLogger, you have to specify the system property carnot.log.type containing the full class name of the WeblogicLogger and the keyword CUSTOM in front of it:

-Dcarnot.log.type=CUSTOM,com.infinity.examples.WeblogicLogger

System properties can be specified via the the ENV properties EXTRA_JAVA_PROPERTIES or JAVA_OPTIONS for WebLogic. To customize the server startup you can create a setUserOverrides file which must be located in the DOMAIN_HOME/bin folder. For Windows this file must have the cmd file extension and for UNIX you have to choose sh.

A setUserOverrides.cmd can look as follows:

set JAVA_OPTIONS=-Dcarnot.log.type=CUSTOM,com.infinity.examples.WeblogicLogger

while the setUserOverrides.sh can have the following content:

export JAVA_OPTIONS=-Dcarnot.log.type=CUSTOM,com.infinity.examples.WeblogicLogger

To include the weblogic-logging example in the deployment you must define the dependency definition in the corresponding project:

   <dependency>
      <groupId>com.infinity.bpm.examples</groupId>
      <artifactId>weblogic-logging</artifactId>
      <version>9.2.0</version>
      <scope>runtime</scope>
   </dependency>

For a project which is created by the WLS EAR Archetype you must include the dependency in the <wls-ear-archetype-project>/ejb module of this project.