ozone core API

org.ozoneDB.util
Class SimpleLogWriter

java.lang.Object
  extended byorg.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

Field Summary
private  int debugLevel
           
private static SimpleLogWriter instance
           
 
Fields inherited from interface org.ozoneDB.util.LogWriter
DEBUG, DEBUG1, DEBUG2, DEBUG3, ERROR, FATAL, INFO, LOG_CONFIG_FILE_NAME, LOG_FILE, WARN
 
Constructor Summary
private SimpleLogWriter()
           
 
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
 

Field Detail

debugLevel

private int debugLevel

instance

private static SimpleLogWriter instance
Constructor Detail

SimpleLogWriter

private SimpleLogWriter()
Method Detail

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

ozone core API

Copyright (C) The Ozone Database Project - www.ozone-db.org. All rights reserved.