Without one of these engines, the car goes no where. The engine of that car is either JULI or log4j. The car you drive when logging is the commons-logging car. In case that's unclear, think of it like this. Tomcat wants to support multiple logging implementations, so it uses commons-logging. What role does commons-logging play in logging? You may use these streams for elementary logging if you wish, but a more robust approach such as commons-logging or Log4J is recommended for production applications. In addition, Tomcat does not swallow the System.out and System.err JVM output streams. To additionally log information about requests going to the web application, "Valves" can be configured in the server.xml file, as described in detail here. Web applications can get logging service by using the Servlet API logging (which not recommended), the JUL interface (which ultimately goes to JULI) or any other preferred interface for which they furnish the jar files and the appropriate configuration (see the respective descriptions for Log4J, SLF4J, logback or Apache Commons Logging for example). This Tomcat logging infrastructure is called JULI, and one can still distinguish its Apache Commons Logging heritage, but the complex configuration has been edited out and the package name changed. The Tomcat startup script configures the JVM to use a web-application-aware implementation of the JUL LogManager. In Tomcat 7 (and also 6), the logging code is based on a set of classes interacting with the API (JUL), which comes with Java since version 1.4.Read the Commons-Logging documentation if you'd like to know how to better use and configure Tomcat's internal logging.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |