Monday 9 May 2011

Why we need logging in java?

This is pretty basic java logging question and everybody argue that if we java system.out.println () for printing messages then whey we use logging. Everybody who starts java starts with system.out.println () for printing message in java console. But this is not at all powerful as compared to advanced java logging API like log4j and java.util.logging. If you are writing a java application server then only way to know what your server is doing is by seeing log file of your server. suppose you don't write anything in your java log file then no body knows what your sever is doing, it becomes increasingly important if your application is connected to upstream and downstream like in many stock trading systems or electronic trading system and get input from upstream , transforms and normalize it and send down to downstream. In case of any issue without java logs you won't be able to figure out what went wrong. That’s why logging in java is most important while writing any java server application. Logging in Java is not by choice it’s must to understand .

No comments:

Post a Comment