Script:
Owner:
Subdir:
Blog ID: 75809171
Group ID: User ID:

Top Point Earners Today

    Online Community Coordinator
    Wellesley Information Services
    Points: 240
    ColdFusion/WebSphere Admininstrator
    AES/PHEAA
    Points: 160
 
Select Forum or Category:
Post Reply
Which's the best practice if I want to log application messages running on WAS?
4 months ago  ::  Jan 31, 2012 - 9:09PM #1
Yasmin
WebSphere Support
IBM
Posts: 31

Hi pals,
Which's the best practice if I want to log application messages running on WAS?
I guess isn't write directly in SystemOut file, right?. I think SystemOut.log must be left for server messages only. Based in your experiences, what way would you recommend?

I read the info center "Adding logging and tracing to your application" but I really did not understand..... :S


Thanks all.

0 (0 Ratings)
4 months ago  ::  Feb 01, 2012 - 5:37PM #2
Joseph
WebSphere Platform Technology Consultant
Consulting Ltd
Posts: 130
Broad question.. here are few methods:

  1. websphere provides an options using Jakartha commons logging [which you might have read under configuring logging and tracing section]. By default, the product uses the Jakarta Commons Logging LogFactory implementation and JDK14Logger, which were specified in commons-logging.properties file. you can use the same logging option for application as well. In such case you need to have its own logger configuration [commons-logging]
  2. You can also use CBE model [common base events]. 
  3. This link discuss in detail about how to use java logging
  4. ..and everyone knows log4j.


 
0 (0 Ratings)
4 months ago  ::  Feb 09, 2012 - 5:03AM #3
Rodney Krick
Senior Consultant
aformatik Training & Consulting
Posts: 7
"I guess isn't write directly in SystemOut file, right?. "
I just want to warn you about this common mistake many developers do. System.out.println() in java is simple to write, but it is a "break" for the program. The reason for that: System.out.println() works synchronously! Your program waits until the message is written to the console. The logging frameworks already mentioned work asynchronously, you send the message and don't have to wait. It's also a performance topic, not only a design issue.
Regards,
Rodney
0 (0 Ratings)
Post Reply
    Viewing this thread :: 0 registered and 1 guest
    No registered users viewing

Tag Cloud

Leader Spotlight

    Loading...