Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Log4J urgent

Status
Not open for further replies.

elanja

Programmer
Sep 10, 2003
13
0
0
IN
which Situation we will go for Log4J?
What Is the Advantages.
I know Log4j.But i don't Know which situation it is usefull?
pls explain Briefly.
By
Rams
 
i would say debugging. When you try to find out my your app is crashing - just check the log files. Instead of typing System.err.print etc, you get the description directly.

~za~
You can't bring back a dead thread!
 
Basically, when writing code, intersperse every major event with a log4j logger call - on parts that may be troublesome add a DEBUG level, and if you want a message for live use/monitoring add a INFO level. Log4J allows this differing level to determine when it should print messages. Hence if your app is breaking, then you restart, setting the logging level to debug. Once it is fixed, you set it back to INFO, or LIVE etc - this saves major time when debugging a failed app after its gone live, or even in test.

Read the docs for more ...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top