public class LoggerListener extends java.lang.Object implements DebugListener
Red (cxh) |
Yellow (eal) |
Constructor and Description |
---|
LoggerListener(java.lang.String name)
Create a logger.
|
LoggerListener(java.lang.String name,
java.io.File directory)
Create a logger.
|
LoggerListener(java.lang.String name,
java.io.File directory,
java.util.logging.Level level)
Create a logger.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the file handler.
|
void |
event(DebugEvent event)
Send a string representation of the event to the log.
|
void |
log(java.util.logging.Level level,
java.lang.String message)
Send the message to the log.
|
void |
message(java.lang.String message)
Send the message to the log.
|
public LoggerListener(java.lang.String name, java.io.File directory, java.util.logging.Level level) throws IllegalActionException
name
- The name for this logger. This should normally be a fully qualified
classname or full name of the object being listened to.directory
- The directory in which to store the log file, or null to use the system temporary directory.level
- The logger level.IllegalActionException
- If the log file cannot be opened.public LoggerListener(java.lang.String name, java.io.File directory) throws IllegalActionException
name
- The name for this logger. This should normally be a fully qualified
classname or full name of the object being listened to.directory
- The directory in which to store the log file, or null to use the system temporary directory.IllegalActionException
- If the log file cannot be opened.public LoggerListener(java.lang.String name) throws IllegalActionException
name
- The name for this logger. This should normally be a fully qualified
classname or full name of the object being listened to.IllegalActionException
- If the log file cannot be opened.public void close()
public void event(DebugEvent event)
event
in interface DebugListener
event
- The event.public void log(java.util.logging.Level level, java.lang.String message)
level
- The level of the message.message
- The message.public void message(java.lang.String message)
message
in interface DebugListener
message
- The message.