public final class JaxoDefaultLogger extends java.lang.Object implements JaxoLogger
Modifier and Type | Class and Description |
---|---|
static class |
JaxoDefaultLogger.LogFormatter
Formats log records in standard JaxoDraw format.
|
Constructor and Description |
---|
JaxoDefaultLogger()
Constructor.
|
JaxoDefaultLogger(java.lang.String logDir)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
java.util.logging.Level |
getLevel()
Returns the current log level of this Logger.
|
boolean |
isLoggable(java.util.logging.Level level)
Check if a message of the given level would actually
be logged by this logger.
|
void |
log(java.util.logging.Level level,
java.lang.String message,
java.lang.Throwable e)
Logs an exception and/or a message at a given level.
|
void |
setLevel(java.util.logging.Level level)
Sets the logging level.
|
public JaxoDefaultLogger()
public JaxoDefaultLogger(java.lang.String logDir)
logDir
- The directory where log files should be stored.
If this doesn't exist, it will be created.
If logDir is null, no FileHandler is added.public void setLevel(java.util.logging.Level level)
setLevel
in interface JaxoLogger
level
- the log level to set.public java.util.logging.Level getLevel()
getLevel
in interface JaxoLogger
public boolean isLoggable(java.util.logging.Level level)
isLoggable
in interface JaxoLogger
level
- a message logging level.public void log(java.util.logging.Level level, java.lang.String message, java.lang.Throwable e)
log
in interface JaxoLogger
level
- the log level.message
- a message to log.e
- an exception to log.Licensed under GPL. For more information, see http://jaxodraw.sourceforge.net/license.html or the LICENSE file in the jaxodraw distribution.