Many programmers use logging or print statement to debug programs. First, it works. Second, it's handy. And third, debuggers may not be available. The flip side is: it may pollute the code if not properly handled, and also there will be a performance drawback. 2 What is log4j? Log4J is a Java package. With log4j, "it is possible to enable logging at runtime without modifying the application binary." [LJ] The log4j package "is designed so that these statements can remain in shipped code without incurring a heavy performance cost"[LJ]. Logging behavior "can be controlled by editing a configuration file, without touching the application binary"[LJ]. 3 What are the possible log4j targets? a local file an OutputStream a java.io.Writer (e.g., response.getWriter() as in JSP and Servlet) a remote log4j server a remote Unix Syslog daemon and more 4 Tutorials Do not use System.out.println(), use log4j Comments References[LJ] http://logging.apache.org/log4j/docs/
Log4J is a Java package. With log4j, "it is possible to enable logging at runtime without modifying the application binary." [LJ] The log4j package "is designed so that these statements can remain in shipped code without incurring a heavy performance cost"[LJ]. Logging behavior "can be controlled by editing a configuration file, without touching the application binary"[LJ]. 3 What are the possible log4j targets? a local file an OutputStream a java.io.Writer (e.g., response.getWriter() as in JSP and Servlet) a remote log4j server a remote Unix Syslog daemon and more 4 Tutorials Do not use System.out.println(), use log4j Comments References[LJ] http://logging.apache.org/log4j/docs/
References[LJ] http://logging.apache.org/log4j/docs/