Logger

wvlet.log.Logger
See theLogger companion object
class Logger(name: String, var wrapped: Logger) extends LoggerBase with Serializable

An wrapper of java.util.logging.Logger for supporting rich-format logging

Attributes

Companion:
object
Graph
Supertypes
trait Serializable
class Object
trait Matchable
class Any

Members list

Concise view

Value members

Concrete methods

def addHandler(h: Handler): Unit
def clear: Unit

Clean up all handlers including this and parent, ancestor loggers

Clean up all handlers including this and parent, ancestor loggers

Attributes

def clearHandlers: Unit
def getHandlers: Seq[Handler]
def getLogLevel: LogLevel
def getName: String
def getParent: Option[Logger]
def isEnabled(level: LogLevel): Boolean
def log(record: LogRecord): Unit
def log(level: LogLevel, source: LogSource, message: Any): Unit
def logWithCause(level: LogLevel, source: LogSource, message: Any, cause: Throwable): Unit
def resetHandler(h: Handler): Unit
def resetLogLevel: Unit
def setFormatter(formatter: LogFormatter): Unit
def setLogLevel(l: LogLevel): Unit
def setUseParentHandlers(use: Boolean): Unit
def suppressLogAroundFuture[U](body: => Future[U])(implicit ec: ExecutionContext): Future[U]

Suppress the log level around the given Future. After the given Future completes, the log level will be reset to the original level.

Suppress the log level around the given Future. After the given Future completes, the log level will be reset to the original level.

Attributes

def suppressLogs[U](f: => U): U

Suppress all log messages. This is useful for error handling tests

Suppress all log messages. This is useful for error handling tests

Attributes

def suppressWarnings[U](f: => U): U

Suppress warning messages (i.e., setting ERROR log level during the code block). Useful for exception testing

Suppress warning messages (i.e., setting ERROR log level during the code block). Useful for exception testing

Attributes

Inherited methods

inline def debug(inline message: Any, inline cause: Throwable): Unit

Attributes

Inherited from:
LoggerBase
inline def debug(inline message: Any): Unit

Attributes

Inherited from:
LoggerBase
inline def error(inline message: Any, inline cause: Throwable): Unit

Attributes

Inherited from:
LoggerBase
inline def error(inline message: Any): Unit

Attributes

Inherited from:
LoggerBase
inline def info(inline message: Any, inline cause: Throwable): Unit

Attributes

Inherited from:
LoggerBase
inline def info(inline message: Any): Unit

Attributes

Inherited from:
LoggerBase
inline def trace(inline message: Any, inline cause: Throwable): Unit

Attributes

Inherited from:
LoggerBase
inline def trace(inline message: Any): Unit

Attributes

Inherited from:
LoggerBase
inline def warn(inline message: Any, inline cause: Throwable): Unit

Attributes

Inherited from:
LoggerBase
inline def warn(inline message: Any): Unit

Attributes

Inherited from:
LoggerBase