Package org.glassfish.grizzly.utils
Class LoggingFormatter
- java.lang.Object
-
- java.util.logging.Formatter
-
- org.glassfish.grizzly.utils.LoggingFormatter
-
public class LoggingFormatter extends Formatter
Format 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 String
format(LogRecord record)
Format the record to include the Thread that logged this record.static void
main(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-
Methods inherited from class java.util.logging.Formatter
formatMessage, getHead, getTail
-
-
-
-
Method Detail
-
format
public String format(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
-
main
public static void main(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
-
-