BufferedLogger

class BufferedLogger(delegate: AbstractLogger) extends BasicLogger

A logger that can buffer the logging done on it and then can flush the buffer to the delegate logger provided in the constructor. Use 'startRecording' to start buffering and then 'play' from to flush the buffer to the backing logger. The logging level set at the time a message is originally logged is used, not the level at the time 'play' is called.

This class assumes that it is the only client of the delegate logger.

class Logger
trait Logger
class Object
trait Matchable
class Any

Value members

Concrete methods

def buffer[T](f: => T): T
def bufferQuietly[T](f: => T): T
def clear(): Unit

Clears buffered events and disables buffering.

Clears buffered events and disables buffering.

def control(event: Value, message: => String): Unit
def log(level: Value, message: => String): Unit
def logAll(events: Seq[LogEvent]): Unit
def play(): Unit

Flushes the buffer to the delegate logger. This method calls logAll on the delegate so that the messages are written consecutively. The buffer is cleared in the process.

Flushes the buffer to the delegate logger. This method calls logAll on the delegate so that the messages are written consecutively. The buffer is cleared in the process.

def record(): Unit

Enables buffering.

Enables buffering.

override
def setLevel(newLevel: Value): Unit
Definition Classes
override
def setSuccessEnabled(flag: Boolean): Unit
Definition Classes
override
def setTrace(level: Int): Unit
Definition Classes
def stop(): Unit

Plays buffered events and disables buffering.

Plays buffered events and disables buffering.

def stopQuietly(): Unit
def success(message: => String): Unit
def trace(t: => Throwable): Unit

Deprecated methods

@deprecated("No longer used.", "1.0.0")
override
def ansiCodesSupported: Boolean
Deprecated
Definition Classes

Inherited methods

def atLevel(level: Value): Boolean
Inherited from
AbstractLogger
def debug(msg: Supplier[String]): Unit
Inherited from
Logger
final
def debug(message: => String): Unit
Inherited from
Logger
final
def err(message: => String): Unit
Inherited from
Logger
def error(msg: Supplier[String]): Unit
Inherited from
Logger
final
def error(message: => String): Unit
Inherited from
Logger
Inherited from
BasicLogger
def getTrace: Int
Inherited from
BasicLogger
def info(msg: Supplier[String]): Unit
Inherited from
Logger
final
def info(message: => String): Unit
Inherited from
Logger
final
def log(event: LogEvent): Unit

Defined in terms of other methods in Logger and should not be called from them.

Defined in terms of other methods in Logger and should not be called from them.

Inherited from
AbstractLogger
def log(level: Value, msg: Supplier[String]): Unit
Inherited from
Logger
final
def out(message: => String): Unit
Inherited from
Logger
def successEnabled: Boolean
Inherited from
BasicLogger
def trace(msg: Supplier[Throwable]): Unit
Inherited from
Logger
final
def traceEnabled: Boolean
Inherited from
AbstractLogger
final
def verbose(message: => String): Unit
Inherited from
Logger
def warn(msg: Supplier[String]): Unit
Inherited from
Logger
final
def warn(message: => String): Unit
Inherited from
Logger