Splitting the ALSB Logging

Splitting the ALSB Logging

What it does

Normally the AquaLogic Service Bus logs in the main Weblogic domain log. This sample code splits the ALSB logging to a separate log.

How it Works

A startup class is used to direct ALSB log entries to the new ALSB log. A log filter is used to stop the ALSB logs from continuing to also go to the Weblogic domain log.

How to install and execute

Compile and deployment steps:

1. Review the ALSBLogStart.properties to make sure these are correct for default values.

2. Run the ant build.xml “jar” task to compile and generate the jtvalsbLogger.jar

3. Put the jtvalsbLogger.jar file in the weblogic domain lib directory on each server in the cluster


For example on my laptop I put the jar file in C:/bea92ALSB/user_projects/domains/alsb_cluster/lib

4. Copy the Create_ESB_Logging_Resources.py and Create_ESB_Logging_Resources.properties files

to some directory on the wls server box.

Edit the Create_ESB_Logging_Resources.properties file to match the desired settings

for the target wls domain.

5. Make sure the target wls domain is running. If the target is a cluster, make sure all the managed

servers are running as well as the admin server.

6. From a command prompt, run the setDomainEnv script in the <wl_home>/../user_projects/domains/<domain>/bin directory

(In windows its setDomainEnv.cmd. In linux its setDomainEnv.sh)

Change directory to the directory containing your Create_ESB_Logging_Resources.py file.

7. Run the wlst script to config the wls domain for the new logging settings.

wlst Create_ESB_Logging_Resources.py

The output should look something like (depending on whether you are installing to cluster):

Starting an edit session …

Started edit session, please be sure to save and activate your

changes once you are done.

creating Log Filter ALSBRejectLogFilter

setting attributes for LogFilter ALSBRejectLogFilter

creating startup class ALSBLogStart

setting attributes for startupClass ALSBLogStart

assigning logFilter ALSBRejectLogFilter to server log AlexAdminServer

assigning logFilter ALSBRejectLogFilter to server log ESB1

assigning logFilter ALSBRejectLogFilter to server log ESB2

Saving all your changes …

Saved all your changes successfully.

Activating all your changes, this may take a while …

The edit lock associated with this edit session is released

once the activation is completed.

Activation completed

End of Main


8. Restart the WLS domain. As the admin server and each managed server start up you should

see something like the following in the console output or server log:

<May 14, 2008 8:41:45 AM EDT> <Notice> <Log Management> <BEA-170027> <The server initialized the domain log broadcaster successfully

. Log messages will now be broadcasted to the domain log.>

*** ALSB Log path = servers/AlexAdminServer/logs/

*** ALSB Log fileName = alsb%u.log

*** ALSB Log fileSizeBytes = 5000000

*** ALSB Log fileCount = 10

*** ALSB Log fileAppend = false

*** Added ALSB Log handler to server logger= weblogic.logging.WLLogger@1563a3d

These messages in the log indicate the startup class is loading properly in each wls server.

9. Check the appropriate log directory to make sure each server in the cluster (admin and managed servers)

have a new alsb log file. The location and name of the new log files will match the ALSBLogStart.properties

settings which are echoed to the server log as shown in step 8 above.

Other related stuff



Post Tagged with ,

One Response so far.

  1. Sohel says:

    Do you have the code for download somewhere?