public class BufferingLog extends AbstractLog
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 received, *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.
You should also not use this logger, when there is a risk that it can be subjected to an unbounded quantity of log messages, since the buffer keeps all messages until it gets a chance to replay them.
| Constructor and Description |
|---|
BufferingLog() |
| Modifier and Type | Method and Description |
|---|---|
void |
bulk(Consumer<Log> consumer)
Used to temporarily log several messages in bulk.
|
Logger |
debugLogger() |
Logger |
errorLogger() |
Logger |
infoLogger() |
boolean |
isDebugEnabled() |
void |
replayInto(Log other)
Replays buffered messages and clears the buffer.
|
String |
toString() |
Logger |
warnLogger() |
public boolean isDebugEnabled()
@Nonnull public Logger debugLogger()
Logger instance for writing debug messages@Nonnull public Logger errorLogger()
Logger instance for writing error messagespublic void bulk(@Nonnull Consumer<Log> consumer)
Logconsumer - A consumer for the bulk Logpublic void replayInto(Log other)
other - the log to reply intoCopyright © 2002–2017 The Neo4j Graph Database Project. All rights reserved.