Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your profile (name, country/region, and company) is displayed to the public and will accompany any content you post. You may update your IBM account at any time.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

Application logging in WebSphere Application Server Community Edition

Using java.util.logging, Log4j and SLF4j

Phani Madgula (mabalaji@in.ibm.com), Software Developer, IBM
author image
Phani is currently working for WebSphere Application Server Community Edition support at India Software Labs (ISL). He has been actively involved in many projects related to migrating applications from other application servers to WebSphere Application Server Community Edition. He has 5 years experience at IBM. He worked in various product teams including WebSphere Application Server Community Edition, WebSphere Business Integration Adapters and DB2. He has experience in developing JEE applications, product support, and database administration. He is an Oracle9i certified professional.

Summary:  WebSphere Application Server Community Edition provides several ways to configure application logging, using java.util.logging, Log4j and SLF4j APIs. Though the steps to configure these logging services are to large extent independent of any application server, WebSphere Application Server requires certain tweaks to get your desired logging behavior. This tutorial walks you through these tweaks coupled with sample applications. WebSphere® Application Server Community Edition is freely available for download, so you can get started in just a few minutes.

Date:  25 Mar 2009
Level:  Intermediate PDF:  A4 and Letter (350 KB | 29 pages)Get Adobe® Reader®

Activity:  42264 views
Comments:  

Conclusion

We have shown how to use java.util.logging, Log4j and SLF4j in Community Edition in various ways. You have learned how to use gbeans to configure services at the server scope. You have also learned how classloader issues can become a problem when you need application-specific configurations for logging services. Finally, your applications might benefit from using SLF4j as a standard API for logging, to let you plug in the desired logging implementation at deployment time.

6 of 9 | Previous | Next

Comments



static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=WebSphere, Open source
ArticleID=376844
TutorialTitle=Application logging in WebSphere Application Server Community Edition
publish-date=03252009
author1-email=mabalaji@in.ibm.com
author1-email-cc=