Debug a Failure.
Debug a Failure. If the log level is debug and the Box is a Failure, debug the message concatenated with the Failure's message. If the Failure contains an Exception, debug that as well.
Error a Failure.
Error a Failure. If the log level is error and the Box is a Failure, error the message concatenated with the Failure's message. If the Failure contains an Exception, error that as well.
Info a Failure.
Info a Failure. If the log level is info and the Box is a Failure, info the message concatenated with the Failure's message. If the Failure contains an Exception, info that as well.
Trace a Failure.
Trace a Failure. If the log level is trace and the Box is a Failure, trace the message concatenated with the Failure's message. If the Failure contains an Exception, trace that as well.
Log the value of v with trace and return v.
Log the value of v with trace and return v. Useful for tracing values in expressions
Warn a Failure.
Warn a Failure. If the log level is warn and the Box is a Failure, warn the message concatenated with the Failure's message. If the Failure contains an Exception, warn that as well.
Logger is a thin wrapper on top of an SLF4J Logger
The main purpose is to utilize Scala features for logging
Note that the dynamic type of "this" is used when this trait is mixed in.
This may not always be what you want. If you need the static type, you have to declare your own Logger:
class MyClass { val logger = Logger(classOf[MyClass]) }