jAER project on SourceForge

net.sf.jaer.util
Class JAERConsoleLoggingFormatter

java.lang.Object
  extended by java.util.logging.Formatter
      extended by java.util.logging.SimpleFormatter
          extended by net.sf.jaer.util.JAERConsoleLoggingFormatter

public class JAERConsoleLoggingFormatter
extends java.util.logging.SimpleFormatter

Defines logging format for console messages in jAER. Use of this logger is defined in the logging configuration file host/java/conf/Logging.properties. There this class is defined as in the following example:

 # this logging configuration is used by jAER when running the application by specifying
# -Djava.util.logging.config.file=conf/Logging.properties in the java machine invocation

# Specify the handlers to create in the root logger

# Set the default logging level for the root logger
.level = INFO

# Set the default logging level for new ConsoleHandler and FileHandler instances
java.util.logging.ConsoleHandler.level = INFO
java.util.logging.FileHandler.level = ALL

# (all loggers are children of the root logger)
# The following creates two handlers
handlers = java.util.logging.ConsoleHandler, java.util.logging.FileHandler
#handlers = java.util.logging.FileHandler


# The following special tokens can be used in the pattern property
# which specifies the location and name of the log file.
#   / - standard path separator
#   %t - system temporary directory
#   %h - value of the user.home system property
#   %g - generation number for rotating logs
#   %u - unique number to avoid conflicts
java.util.logging.FileHandler.pattern=%t/jAER.log

# Set the default formatter for new ConsoleHandler instances
java.util.logging.ConsoleHandler.formatter = net.sf.jaer.util.JAERConsoleLoggingFormatter
java.util.logging.FileHandler.formatter = java.util.logging.SimpleFormatter
 

Author:
tobi

Constructor Summary
JAERConsoleLoggingFormatter()
          Creates a new instance of JAERConsoleLoggingFormatter
 
Method Summary
 java.lang.String format(java.util.logging.LogRecord record)
           
 
Methods inherited from class java.util.logging.Formatter
formatMessage, getHead, getTail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JAERConsoleLoggingFormatter

public JAERConsoleLoggingFormatter()
Creates a new instance of JAERConsoleLoggingFormatter

Method Detail

format

public java.lang.String format(java.util.logging.LogRecord record)
Overrides:
format in class java.util.logging.SimpleFormatter

jAER project on SourceForge