Package org.glassfish.grizzly.utils
Class LoggingFormatter
- java.lang.Object
-
- java.util.logging.Formatter
-
- org.glassfish.grizzly.utils.LoggingFormatter
-
public class LoggingFormatter extends java.util.logging.FormatterFormat the record to include the Thread that logged the record. To change the default configuration for java.util.logging you will need to add this in the command line parameters : -Djava.util.logging.config.file=myfile Here a sample of what you need to include in myfile #the default logger is this add you can replace it with LoggingFormatter #java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter java.util.logging.ConsoleHandler.formatter = com.glassfish.grizzly.utils.LoggingFormatter refer to : https://grizzly.dev.java.net/issues/show_bug.cgi?id=291- Author:
- Sebastien Dionne
-
-
Constructor Summary
Constructors Constructor Description LoggingFormatter()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Stringformat(java.util.logging.LogRecord record)Format the record to include the Thread that logged this record. the format should be [WorkerThreadImpl-1, Grizzly] 2008-10-08 18:49:59 [INFO] com.glassfish.grizzly.Controller:doSelect messagestatic voidmain(java.lang.String[] args)Example to test the com.glassfish.grizzly.utils.LoggingFormatter You need to include this parameter in the command line -Djava.util.logging.config.file=myfile
-
-
-
Method Detail
-
format
public java.lang.String format(java.util.logging.LogRecord record)
Format the record to include the Thread that logged this record. the format should be [WorkerThreadImpl-1, Grizzly] 2008-10-08 18:49:59 [INFO] com.glassfish.grizzly.Controller:doSelect message- Specified by:
formatin classjava.util.logging.Formatter- Parameters:
record- The record to be logged into the logger.- Returns:
- the record formated to be more human readable
-
main
public static void main(java.lang.String[] args)
Example to test the com.glassfish.grizzly.utils.LoggingFormatter You need to include this parameter in the command line -Djava.util.logging.config.file=myfile- Parameters:
args- main parameters
-
-