Logger

final case class Logger(transports: List[LoggerTransport]) extends LoggerMacroExtensions

This is the base class for all logging operations. Logger is a collection of LoggerTransports. Internally whenever a message needs to be logged, it is broadcasted to all the available transports. The transports can internally decide what to do with the mssage and discard it if the message or the level is not relevant to the transport.

Companion:
object
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any

Value members

Concrete methods

def ++(other: Logger): Logger

Combines to loggers into one

Combines to loggers into one

def combine(other: Logger): Logger

Combines to loggers into one

Combines to loggers into one

Modifies the transports to read the log level from the passed environment variable.

Modifies the transports to read the log level from the passed environment variable.

Modifies the transports to read the log level from the set system property.

Modifies the transports to read the log level from the set system property.

def dispatch(msg: String, level: LogLevel, cause: Option[Throwable], sourceLocation: Option[SourcePos]): Unit

Dispatches the parameters to all the transports. Internally invoked by the macro.

Dispatches the parameters to all the transports. Internally invoked by the macro.

def dispatch(msg: String, level: LogLevel): Unit

Dispatches the parameters to all the transports. Internally invoked by the macro.

Dispatches the parameters to all the transports. Internally invoked by the macro.

def startsWith(prefix: String): Logger

Creates a new logger that will log messages that start with the given prefix.

Creates a new logger that will log messages that start with the given prefix.

def withFilter(filter: String => Boolean): Logger

Creates a new logger that only log messages that are accepted by the provided filter.

Creates a new logger that only log messages that are accepted by the provided filter.

Modifies all the transports to support the given log format

Modifies all the transports to support the given log format

Modifies the level for each transport. Messages that don't meet that level will not be logged by any of the transports

Modifies the level for each transport. Messages that don't meet that level will not be logged by any of the transports

Creates a new Logger with the provided tags

Creates a new Logger with the provided tags

def withTags(tags: String*): Logger

Creates a new Logger with the provided tags

Creates a new Logger with the provided tags

def withTransport(transport: LoggerTransport): Logger

Adds a new transport to the logger

Adds a new transport to the logger

Inherited methods

inline def debug(inline msg: String): Unit
Inherited from:
LoggerMacroExtensions
inline def error(inline msg: String, throwable: Throwable): Unit
Inherited from:
LoggerMacroExtensions
inline def error(inline msg: String): Unit
Inherited from:
LoggerMacroExtensions
inline def info(inline msg: String): Unit
Inherited from:
LoggerMacroExtensions
Inherited from:
Product
inline def trace(inline msg: String): Unit
Inherited from:
LoggerMacroExtensions
inline def warn(inline msg: String): Unit
Inherited from:
LoggerMacroExtensions