Logs an object at the given Level
including the stack trace of the given Throwable
.
Logs an object at the given Level
including the stack trace of the given Throwable
.
the logging level
the message to be logged
a Throwable
Logs a string at the given Level
including the stack trace of the given Throwable
.
Logs a string at the given Level
including the stack trace of the given Throwable
.
the logging level
the message to be logged
a Throwable
Logs a Message
at the given Level
including the stack trace of the given Throwable
.
Logs a Message
at the given Level
including the stack trace of the given Throwable
.
the logging level
the message to be logged
a Throwable
Logs an object at the given Level
.
Logs an object at the given Level
.
the logging level
the message to be logged
Logs a string at the given Level
.
Logs a string at the given Level
.
the logging level
the message to be logged
Logs a Message
at the given Level
.
Logs a Message
at the given Level
.
the logging level
the message to be logged
Logs an object with the specific Marker
at the given Level
including the stack trace
of the given Throwable
.
Logs an object with the specific Marker
at the given Level
including the stack trace
of the given Throwable
.
the logging level
the marker data specific to this log statement
the message to be logged
the cause
Logs a string with the specific Marker
at the given Level
including the stack trace
of the given Throwable
.
Logs a string with the specific Marker
at the given Level
including the stack trace
of the given Throwable
.
the logging level
the marker data specific to this log statement
the message to be logged
the cause
Logs a Message
with the specific Marker
at the given Level
including the stack trace
of the given Throwable
.
Logs a Message
with the specific Marker
at the given Level
including the stack trace
of the given Throwable
.
the logging level
the marker data specific to this log statement
the message to be logged
the cause
Logs an object with the specific Marker
at the given Level
.
Logs an object with the specific Marker
at the given Level
.
the logging level
the marker data specific to this log statement
the message to be logged
Logs a string with the specific Marker
at the given Level
.
Logs a string with the specific Marker
at the given Level
.
the logging level
the marker data specific to this log statement
the message to be logged
Logs a Message
with the specific Marker
at the given Level
.
Logs a Message
with the specific Marker
at the given Level
.
the logging level
the marker data specific to this log statement
the message to be logged
Logs an exception or error that has been caught to a specific logging level.
Logs an exception or error that has been caught to a specific logging level.
The logging Level.
The Throwable.
Logs an exception or error that has been caught.
Logs an exception or error that has been caught.
the Throwable.
Always logs a message at the specified level.
Always logs a message at the specified level. It is the responsibility of the caller to ensure the specified level is enabled.
Should normally not be used directly from application code, but needs to be public for access by macros.
log level
marker or null
message
cause or null
Always logs a message at the specified level.
Always logs a message at the specified level. It is the responsibility of the caller to ensure the specified level is enabled.
Should normally not be used directly from application code, but needs to be public for access by macros.
log level
marker or null
message
cause or null
Always logs a message at the specified level.
Always logs a message at the specified level. It is the responsibility of the caller to ensure the specified level is enabled.
Should normally not be used directly from application code, but needs to be public for access by macros.
log level
marker or null
message
cause or null
Logs an exception or error to be thrown to a specific logging level.
Logs an exception or error to be thrown to a specific logging level.
throw logger.throwing(Level.DEBUG, myException)
the logging Level.
the Throwable
t
Logs an exception or error to be thrown.
Logs an exception or error to be thrown.
throw logger.throwing(myException)
the Throwable
t
Logs entry to a method using a Message
to describe the parameters.
Logs entry to a method using a Message
to describe the parameters.
def doSomething(foo: Request): Unit = { logger.traceEntry(JsonMessage(foo)) // do something }
the message
The built EntryMessage
Logs entry to a method along with its parameters.
Logs entry to a method along with its parameters.
def doSomething(foo: String, bar: Int): Unit = { logger.traceEntry(foo, bar) // do something }
the parameters to the method.
The built EntryMessage
Logs entry to a method.
Logs entry to a method. Used when the method in question has no parameters or when the parameters should not be logged.
The built EntryMessage
Logs exiting from a method with result.
Logs exiting from a method with result. Allows custom formatting of the result.
the Message containing the formatted result
The result being returned from the method call.
result
Logs exiting from a method with result.
Logs exiting from a method with result.
def doSomething(foo: String, bar: Int): Int = { val entryMessage = logger.traceEntry(foo, bar) // do something traceExit(entryMessage, value) }
the EntryMessage
returned from one of the traceEntry
methods
The result being returned from the method call
result
Logs exiting from a method with no result.
Logs exiting from a method with no result.
the EntryMessage
returned from one of the traceEntry
methods
Logs exiting from a method with result.
Logs exiting from a method with result.
The result being returned from the method call
result
Logs exit from a method with no result.
Scala wrapper for the Log4j
Logger
interface.Frequently the purpose of logging is to provide information about what is happening in the system, which requires including information about the objects being manipulated. In Scala, you can use string interpolation to achieve this:
logger.debug(s"Logging in user ${user.getName} with birthday ${user.calcBirthday}")
Since this wrapper is implemented with macros, the String construction and method invocations will only occur when debug logging is enabled.