org.ozoneDB.util
Class SimpleLogWriter
java.lang.Object
org.ozoneDB.util.SimpleLogWriter
- All Implemented Interfaces:
- LogWriter, java.io.Serializable
- public class SimpleLogWriter
- extends java.lang.Object
- implements LogWriter, java.io.Serializable
Provides simple console logging
Usage: LogWriter logWriter = SimpleLogWriter.getInstance().setDebugLevel(LogWriter.DEBUG);
- Author:
- Per Nyfelt
- See Also:
- Serialized Form
Method Summary |
static SimpleLogWriter |
getInstance()
|
boolean |
hasTarget(int level)
This method allows to quickly find out if there is any log target that
would receive entries of the specified level. |
void |
newEntry(java.lang.Object sender,
java.lang.String msg,
int level)
|
void |
newEntry(java.lang.Object sender,
java.lang.String msg,
java.lang.Throwable e,
int level)
|
SimpleLogWriter |
setDebugLevel(int debugLevel)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
debugLevel
private int debugLevel
instance
private static SimpleLogWriter instance
SimpleLogWriter
private SimpleLogWriter()
getInstance
public static SimpleLogWriter getInstance()
setDebugLevel
public SimpleLogWriter setDebugLevel(int debugLevel)
hasTarget
public boolean hasTarget(int level)
- This method allows to quickly find out if there is any log target that
would receive entries of the specified level.
- Specified by:
hasTarget
in interface LogWriter
newEntry
public void newEntry(java.lang.Object sender,
java.lang.String msg,
int level)
- Specified by:
newEntry
in interface LogWriter
newEntry
public void newEntry(java.lang.Object sender,
java.lang.String msg,
java.lang.Throwable e,
int level)
- Specified by:
newEntry
in interface LogWriter
Copyright (C) The Ozone Database Project - www.ozone-db.org. All rights reserved.