Search |
||
New logging formatter for GrizzlyPosted by survivant on November 3, 2008 at 6:16 AM PST
I created a new logging formatter for Grizzly, because when we were debugging a test we weren't able to trace in the log the event because the default formatter in java.util.logging doesn't print the Thread that log the event. (ouff.. that a long line) The new formatter is : com.sun.grizzly.util.LoggingFormatter It's based on java.util.logging.SimpleFormatter. It's really simple to change the formatter used by java.util.logging API. You will have to create a file logging.properties (can be any name) and add this parameter to the command line. -Djava.util.logging.config.file=logging.properties There is already a file name logging.properties that came with the JRE. (jre/lib/logging.properties). You can take this file as sample for your application. With these file, you will have only one line to change to use the new logging formatter. * #the default logger is this add you can replace it with LoggingFormatter An example of the output will look like that : »
Related Topics >>
Open Source Comments
Comments are listed in date ascending order (oldest first)
|
||
|
|