Neo4j Community

org.neo4j.kernel.logging
Class BufferingLogger

java.lang.Object
  extended by org.neo4j.kernel.impl.util.StringLogger
      extended by org.neo4j.kernel.logging.BufferingLogger

public class BufferingLogger
extends org.neo4j.kernel.impl.util.StringLogger

Buffers all messages sent to it, and is able to replay those messages into another StringLogger. This can be used to start up services that need logging when they start, but where, for one reason or another, we have not yet set up proper logging in the application lifecycle. This will replay messages in the order they are recieved, *however*, it will not preserve the time stamps of the original messages. You should not use this for logging messages where the time stamps are important.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.neo4j.kernel.impl.util.StringLogger
org.neo4j.kernel.impl.util.StringLogger.LineLogger, org.neo4j.kernel.impl.util.StringLogger.LineLoggerImpl
 
Field Summary
 
Fields inherited from class org.neo4j.kernel.impl.util.StringLogger
DEFAULT_NAME, DEV_NULL, SYSTEM
 
Constructor Summary
BufferingLogger()
           
 
Method Summary
 void addRotationListener(Runnable listener)
           
 void close()
           
 void flush()
           
protected  void logLine(String line)
           
 void logLongMessage(String msg, Visitor<org.neo4j.kernel.impl.util.StringLogger.LineLogger> source, boolean flush)
           
 void logMessage(String msg)
           
 void logMessage(String msg, boolean flush)
           
 void logMessage(String msg, Throwable throwable)
           
 void logMessage(String msg, Throwable cause, boolean flush)
           
 void replayInto(org.neo4j.kernel.impl.util.StringLogger other)
          Replays buffered messages and clears the buffer.
 String toString()
           
 
Methods inherited from class org.neo4j.kernel.impl.util.StringLogger
logger, logger, logger, logLongMessage, logLongMessage, logLongMessage, logLongMessage, logLongMessage, wrap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BufferingLogger

public BufferingLogger()
Method Detail

logMessage

public void logMessage(String msg)
Overrides:
logMessage in class org.neo4j.kernel.impl.util.StringLogger

logMessage

public void logMessage(String msg,
                       Throwable throwable)
Overrides:
logMessage in class org.neo4j.kernel.impl.util.StringLogger

logMessage

public void logMessage(String msg,
                       boolean flush)
Specified by:
logMessage in class org.neo4j.kernel.impl.util.StringLogger

logMessage

public void logMessage(String msg,
                       Throwable cause,
                       boolean flush)
Specified by:
logMessage in class org.neo4j.kernel.impl.util.StringLogger

logLongMessage

public void logLongMessage(String msg,
                           Visitor<org.neo4j.kernel.impl.util.StringLogger.LineLogger> source,
                           boolean flush)
Specified by:
logLongMessage in class org.neo4j.kernel.impl.util.StringLogger

addRotationListener

public void addRotationListener(Runnable listener)
Specified by:
addRotationListener in class org.neo4j.kernel.impl.util.StringLogger

logLine

protected void logLine(String line)
Specified by:
logLine in class org.neo4j.kernel.impl.util.StringLogger

flush

public void flush()
Specified by:
flush in class org.neo4j.kernel.impl.util.StringLogger

close

public void close()
Specified by:
close in class org.neo4j.kernel.impl.util.StringLogger

replayInto

public void replayInto(org.neo4j.kernel.impl.util.StringLogger other)
Replays buffered messages and clears the buffer.


toString

public String toString()
Overrides:
toString in class Object

Neo4j Community

Copyright © 2002-2012 The Neo4j Graph Database Project. All Rights Reserved.