Logger

cc.otavia.core.slf4a.Logger
See theLogger companion object
trait Logger

The Logger interface is the main user entry point of SLF4A API. It is expected that logging takes place through concrete implementations of this interface.

=== Example ===

    @main def run(): Unit = {
        val system = ActorSystem()
        val logger = LoggerFactory.getLogger(getClass, system)
        logger.info("actor system started!")
    }

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object NOPLogger

Members list

Value members

Abstract methods

def debug(msg: String): Unit

Log a message at the DEBUG level.

Log a message at the DEBUG level.

Value parameters

msg

the message string to be logged

Attributes

def debug(format: String, arg: Any): Unit

Log a message at the DEBUG level according to the specified format and argument.

Log a message at the DEBUG level according to the specified format and argument.

This form avoids superfluous object creation when the logger is disabled for the DEBUG level.

Value parameters

arg

the argument

format

the format string

Attributes

def debug(format: String, arg1: Any, arg2: Any): Unit

Log a message at the DEBUG level according to the specified format and arguments.

Log a message at the DEBUG level according to the specified format and arguments.

This form avoids superfluous object creation when the logger is disabled for the DEBUG level.

Value parameters

arg1

the first argument

arg2

the second argument

format

the format string

Attributes

def debug(msg: String, e: Throwable): Unit

Log an exception (throwable) at the DEBUG level with an accompanying message.

Log an exception (throwable) at the DEBUG level with an accompanying message.

Value parameters

e

the exception (throwable) to log

msg

the message accompanying the exception

Attributes

def error(msg: String): Unit

Log a message at the ERROR level.

Log a message at the ERROR level.

Value parameters

msg

the message string to be logged

Attributes

def error(format: String, arg: Any): Unit

Log a message at the ERROR level according to the specified format and argument.

Log a message at the ERROR level according to the specified format and argument.

This form avoids superfluous object creation when the logger is disabled for the ERROR level.

Value parameters

arg

the argument

format

the format string

Attributes

def error(format: String, arg1: Any, arg2: Any): Unit

Log a message at the ERROR level according to the specified format and arguments.

Log a message at the ERROR level according to the specified format and arguments.

This form avoids superfluous object creation when the logger is disabled for the ERROR level.

Value parameters

arg1

the first argument

arg2

the second argument

format

the format string

Attributes

def error(format: String, args: Any*): Unit

Log a message at the ERROR level according to the specified format and arguments.

Log a message at the ERROR level according to the specified format and arguments.

This form avoids superfluous string concatenation when the logger is disabled for the ERROR level. However, this variant incurs the hidden (and relatively small) cost of creating an Seq before invoking the method, even if this logger is disabled for ERROR. The variants taking one and two arguments exist solely in order to avoid this hidden cost.

Value parameters

arguments

a list of 3 or more arguments

format

the format string

Attributes

def error(msg: String, e: Throwable): Unit

Log an exception (throwable) at the ERROR level with an accompanying message.

Log an exception (throwable) at the ERROR level with an accompanying message.

Value parameters

e

the exception (throwable) to log

msg

the message accompanying the exception

Attributes

def getName: String

Return the name of this Logger instance.

Return the name of this Logger instance.

Attributes

Returns

name of this logger instance

def info(msg: String): Unit

Log a message at the INFO level.

Log a message at the INFO level.

Value parameters

msg

the message string to be logged

Attributes

def info(format: String, arg: Any): Unit

Log a message at the INFO level according to the specified format and argument.

Log a message at the INFO level according to the specified format and argument.

This form avoids superfluous object creation when the logger is disabled for the INFO level.

Value parameters

arg

the argument

format

the format string

Attributes

def info(format: String, arg1: Any, arg2: Any): Unit

Log a message at the INFO level according to the specified format and arguments.

Log a message at the INFO level according to the specified format and arguments.

This form avoids superfluous object creation when the logger is disabled for the INFO level.

Value parameters

arg1

the first argument

arg2

the second argument

format

the format string

Attributes

def info(format: String, args: Any*): Unit

Log a message at the INFO level according to the specified format and arguments.

Log a message at the INFO level according to the specified format and arguments.

This form avoids superfluous string concatenation when the logger is disabled for the INFO level. However, this variant incurs the hidden (and relatively small) cost of creating an Seq before invoking the method, even if this logger is disabled for INFO. The variants taking one and two arguments exist solely in order to avoid this hidden cost.

Value parameters

arguments

a list of 3 or more arguments

format

the format string

Attributes

def info(msg: String, e: Throwable): Unit

Log an exception (throwable) at the INFO level with an accompanying message.

Log an exception (throwable) at the INFO level with an accompanying message.

Value parameters

e

the exception (throwable) to log

msg

the message accompanying the exception

Attributes

def isDebugEnabled: Boolean

Is the logger instance enabled for the DEBUG level?

Is the logger instance enabled for the DEBUG level?

Attributes

Returns

True if this Logger is enabled for the DEBUG level, false otherwise.

def isErrorEnabled: Boolean

Is the logger instance enabled for the ERROR level?

Is the logger instance enabled for the ERROR level?

Attributes

Returns

True if this Logger is enabled for the ERROR level, false otherwise.

def isInfoEnabled: Boolean

Is the logger instance enabled for the INFO level?

Is the logger instance enabled for the INFO level?

Attributes

Returns

True if this Logger is enabled for the INFO level, false otherwise.

def isTraceEnabled: Boolean

Is the logger instance enabled for the TRACE level?

Is the logger instance enabled for the TRACE level?

Attributes

Returns

True if this Logger is enabled for the TRACE level, false otherwise.

def isWarnEnabled: Boolean

Is the logger instance enabled for the WARN level?

Is the logger instance enabled for the WARN level?

Attributes

Returns

True if this Logger is enabled for the WARN level, false otherwise.

def trace(msg: String): Unit

Log a message at the TRACE level.

Log a message at the TRACE level.

Value parameters

msg

the message string to be logged

Attributes

def trace(format: String, arg: Any): Unit

Log a message at the TRACE level according to the specified format and argument.

Log a message at the TRACE level according to the specified format and argument.

This form avoids superfluous object creation when the logger is disabled for the TRACE level.

Value parameters

arg

the argument

format

the format string

Attributes

def trace(format: String, arg1: Any, arg2: Any): Unit

Log a message at the TRACE level according to the specified format and arguments.

Log a message at the TRACE level according to the specified format and arguments.

This form avoids superfluous object creation when the logger is disabled for the TRACE level.

Value parameters

arg1

the first argument

arg2

the second argument

format

the format string

Attributes

def trace(msg: String, e: Throwable): Unit

Log an exception (throwable) at the TRACE level with an accompanying message.

Log an exception (throwable) at the TRACE level with an accompanying message.

Value parameters

e

the exception (throwable) to log

msg

the message accompanying the exception

Attributes

def warn(msg: String): Unit

Log a message at the WARN level.

Log a message at the WARN level.

Value parameters

msg

the message string to be logged

Attributes

def warn(format: String, arg: Any): Unit

Log a message at the WARN level according to the specified format and argument.

Log a message at the WARN level according to the specified format and argument.

This form avoids superfluous object creation when the logger is disabled for the WARN level.

Value parameters

arg

the argument

format

the format string

Attributes

def warn(format: String, arg1: Any, arg2: Any): Unit

Log a message at the WARN level according to the specified format and arguments.

Log a message at the WARN level according to the specified format and arguments.

This form avoids superfluous object creation when the logger is disabled for the WARN level.

Value parameters

arg1

the first argument

arg2

the second argument

format

the format string

Attributes

def warn(msg: String, e: Throwable): Unit

Log an exception (throwable) at the WARN level with an accompanying message.

Log an exception (throwable) at the WARN level with an accompanying message.

Value parameters

e

the exception (throwable) to log

msg

the message accompanying the exception

Attributes