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.
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.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.