akka.event
Interface LoggingAdapter

All Known Subinterfaces:
DiagnosticLoggingAdapter, JavaLoggingAdapter
All Known Implementing Classes:
BusLogging, NoLogging, NoLogging$

public interface LoggingAdapter

Logging wrapper to make nicer and optimize: provide template versions which evaluate .toString only if the log level is actually enabled. Typically used by obtaining an implementation from the Logging object:

 val log = Logging(<bus>, <source object>)
 ...
 log.info("hello world!")
 

All log-level methods support simple interpolation templates with up to four arguments placed by using {} within the template (first string argument):

 log.error(exception, "Exception while processing {} in state {}", msg, state)
 


Method Summary
 void debug(java.lang.String message)
          Log message at debug level.
 void debug(java.lang.String template, java.lang.Object arg1)
          Message template with 1 replacement argument.
 void debug(java.lang.String template, java.lang.Object arg1, java.lang.Object arg2)
          Message template with 2 replacement arguments.
 void debug(java.lang.String template, java.lang.Object arg1, java.lang.Object arg2, java.lang.Object arg3)
          Message template with 3 replacement arguments.
 void debug(java.lang.String template, java.lang.Object arg1, java.lang.Object arg2, java.lang.Object arg3, java.lang.Object arg4)
          Message template with 4 replacement arguments.
 void error(java.lang.String message)
          Log message at error level, without providing the exception that caused the error.
 void error(java.lang.String template, java.lang.Object arg1)
          Message template with 1 replacement argument.
 void error(java.lang.String template, java.lang.Object arg1, java.lang.Object arg2)
          Message template with 2 replacement arguments.
 void error(java.lang.String template, java.lang.Object arg1, java.lang.Object arg2, java.lang.Object arg3)
          Message template with 3 replacement arguments.
 void error(java.lang.String template, java.lang.Object arg1, java.lang.Object arg2, java.lang.Object arg3, java.lang.Object arg4)
          Message template with 4 replacement arguments.
 void error(java.lang.Throwable cause, java.lang.String message)
          Log message at error level, including the exception that caused the error.
 void error(java.lang.Throwable cause, java.lang.String template, java.lang.Object arg1)
          Message template with 1 replacement argument.
 void error(java.lang.Throwable cause, java.lang.String template, java.lang.Object arg1, java.lang.Object arg2)
          Message template with 2 replacement arguments.
 void error(java.lang.Throwable cause, java.lang.String template, java.lang.Object arg1, java.lang.Object arg2, java.lang.Object arg3)
          Message template with 3 replacement arguments.
 void error(java.lang.Throwable cause, java.lang.String template, java.lang.Object arg1, java.lang.Object arg2, java.lang.Object arg3, java.lang.Object arg4)
          Message template with 4 replacement arguments.
 java.lang.String format(java.lang.String t, scala.collection.Seq<java.lang.Object> arg)
           
 java.lang.String format1(java.lang.String t, java.lang.Object arg)
           
 void info(java.lang.String message)
          Log message at info level.
 void info(java.lang.String template, java.lang.Object arg1)
          Message template with 1 replacement argument.
 void info(java.lang.String template, java.lang.Object arg1, java.lang.Object arg2)
          Message template with 2 replacement arguments.
 void info(java.lang.String template, java.lang.Object arg1, java.lang.Object arg2, java.lang.Object arg3)
          Message template with 3 replacement arguments.
 void info(java.lang.String template, java.lang.Object arg1, java.lang.Object arg2, java.lang.Object arg3, java.lang.Object arg4)
          Message template with 4 replacement arguments.
 boolean isDebugEnabled()
           
 boolean isEnabled(Logging.LogLevel level)
           
 boolean isErrorEnabled()
           
 boolean isInfoEnabled()
           
 boolean isWarningEnabled()
           
 void log(Logging.LogLevel level, java.lang.String message)
          Log message at the specified log level.
 void log(Logging.LogLevel level, java.lang.String template, java.lang.Object arg1)
          Message template with 1 replacement argument.
 void log(Logging.LogLevel level, java.lang.String template, java.lang.Object arg1, java.lang.Object arg2)
          Message template with 2 replacement arguments.
 void log(Logging.LogLevel level, java.lang.String template, java.lang.Object arg1, java.lang.Object arg2, java.lang.Object arg3)
          Message template with 3 replacement arguments.
 void log(Logging.LogLevel level, java.lang.String template, java.lang.Object arg1, java.lang.Object arg2, java.lang.Object arg3, java.lang.Object arg4)
          Message template with 4 replacement arguments.
 scala.collection.immutable.Map<java.lang.String,java.lang.Object> mdc()
           
 void notifyDebug(java.lang.String message)
           
 void notifyError(java.lang.String message)
           
 void notifyError(java.lang.Throwable cause, java.lang.String message)
           
 void notifyInfo(java.lang.String message)
           
 void notifyLog(Logging.LogLevel level, java.lang.String message)
           
 void notifyWarning(java.lang.String message)
           
 void warning(java.lang.String message)
          Log message at warning level.
 void warning(java.lang.String template, java.lang.Object arg1)
          Message template with 1 replacement argument.
 void warning(java.lang.String template, java.lang.Object arg1, java.lang.Object arg2)
          Message template with 2 replacement arguments.
 void warning(java.lang.String template, java.lang.Object arg1, java.lang.Object arg2, java.lang.Object arg3)
          Message template with 3 replacement arguments.
 void warning(java.lang.String template, java.lang.Object arg1, java.lang.Object arg2, java.lang.Object arg3, java.lang.Object arg4)
          Message template with 4 replacement arguments.
 

Method Detail

mdc

scala.collection.immutable.Map<java.lang.String,java.lang.Object> mdc()

isErrorEnabled

boolean isErrorEnabled()

isWarningEnabled

boolean isWarningEnabled()

isInfoEnabled

boolean isInfoEnabled()

isDebugEnabled

boolean isDebugEnabled()

notifyError

void notifyError(java.lang.String message)

notifyError

void notifyError(java.lang.Throwable cause,
                 java.lang.String message)

notifyWarning

void notifyWarning(java.lang.String message)

notifyInfo

void notifyInfo(java.lang.String message)

notifyDebug

void notifyDebug(java.lang.String message)

error

void error(java.lang.Throwable cause,
           java.lang.String message)
Log message at error level, including the exception that caused the error.

See Also:
LoggingAdapter

error

void error(java.lang.Throwable cause,
           java.lang.String template,
           java.lang.Object arg1)
Message template with 1 replacement argument.

See Also:
LoggingAdapter

error

void error(java.lang.Throwable cause,
           java.lang.String template,
           java.lang.Object arg1,
           java.lang.Object arg2)
Message template with 2 replacement arguments.

See Also:
LoggingAdapter

error

void error(java.lang.Throwable cause,
           java.lang.String template,
           java.lang.Object arg1,
           java.lang.Object arg2,
           java.lang.Object arg3)
Message template with 3 replacement arguments.

See Also:
LoggingAdapter

error

void error(java.lang.Throwable cause,
           java.lang.String template,
           java.lang.Object arg1,
           java.lang.Object arg2,
           java.lang.Object arg3,
           java.lang.Object arg4)
Message template with 4 replacement arguments.

See Also:
LoggingAdapter

error

void error(java.lang.String message)
Log message at error level, without providing the exception that caused the error.

See Also:
LoggingAdapter

error

void error(java.lang.String template,
           java.lang.Object arg1)
Message template with 1 replacement argument.

See Also:
LoggingAdapter

error

void error(java.lang.String template,
           java.lang.Object arg1,
           java.lang.Object arg2)
Message template with 2 replacement arguments.

See Also:
LoggingAdapter

error

void error(java.lang.String template,
           java.lang.Object arg1,
           java.lang.Object arg2,
           java.lang.Object arg3)
Message template with 3 replacement arguments.

See Also:
LoggingAdapter

error

void error(java.lang.String template,
           java.lang.Object arg1,
           java.lang.Object arg2,
           java.lang.Object arg3,
           java.lang.Object arg4)
Message template with 4 replacement arguments.

See Also:
LoggingAdapter

warning

void warning(java.lang.String message)
Log message at warning level.

See Also:
LoggingAdapter

warning

void warning(java.lang.String template,
             java.lang.Object arg1)
Message template with 1 replacement argument.

See Also:
LoggingAdapter

warning

void warning(java.lang.String template,
             java.lang.Object arg1,
             java.lang.Object arg2)
Message template with 2 replacement arguments.

See Also:
LoggingAdapter

warning

void warning(java.lang.String template,
             java.lang.Object arg1,
             java.lang.Object arg2,
             java.lang.Object arg3)
Message template with 3 replacement arguments.

See Also:
LoggingAdapter

warning

void warning(java.lang.String template,
             java.lang.Object arg1,
             java.lang.Object arg2,
             java.lang.Object arg3,
             java.lang.Object arg4)
Message template with 4 replacement arguments.

See Also:
LoggingAdapter

info

void info(java.lang.String message)
Log message at info level.

See Also:
LoggingAdapter

info

void info(java.lang.String template,
          java.lang.Object arg1)
Message template with 1 replacement argument.

See Also:
LoggingAdapter

info

void info(java.lang.String template,
          java.lang.Object arg1,
          java.lang.Object arg2)
Message template with 2 replacement arguments.

See Also:
LoggingAdapter

info

void info(java.lang.String template,
          java.lang.Object arg1,
          java.lang.Object arg2,
          java.lang.Object arg3)
Message template with 3 replacement arguments.

See Also:
LoggingAdapter

info

void info(java.lang.String template,
          java.lang.Object arg1,
          java.lang.Object arg2,
          java.lang.Object arg3,
          java.lang.Object arg4)
Message template with 4 replacement arguments.

See Also:
LoggingAdapter

debug

void debug(java.lang.String message)
Log message at debug level.

See Also:
LoggingAdapter

debug

void debug(java.lang.String template,
           java.lang.Object arg1)
Message template with 1 replacement argument.

See Also:
LoggingAdapter

debug

void debug(java.lang.String template,
           java.lang.Object arg1,
           java.lang.Object arg2)
Message template with 2 replacement arguments.

See Also:
LoggingAdapter

debug

void debug(java.lang.String template,
           java.lang.Object arg1,
           java.lang.Object arg2,
           java.lang.Object arg3)
Message template with 3 replacement arguments.

See Also:
LoggingAdapter

debug

void debug(java.lang.String template,
           java.lang.Object arg1,
           java.lang.Object arg2,
           java.lang.Object arg3,
           java.lang.Object arg4)
Message template with 4 replacement arguments.

See Also:
LoggingAdapter

log

void log(Logging.LogLevel level,
         java.lang.String message)
Log message at the specified log level.


log

void log(Logging.LogLevel level,
         java.lang.String template,
         java.lang.Object arg1)
Message template with 1 replacement argument.


log

void log(Logging.LogLevel level,
         java.lang.String template,
         java.lang.Object arg1,
         java.lang.Object arg2)
Message template with 2 replacement arguments.


log

void log(Logging.LogLevel level,
         java.lang.String template,
         java.lang.Object arg1,
         java.lang.Object arg2,
         java.lang.Object arg3)
Message template with 3 replacement arguments.


log

void log(Logging.LogLevel level,
         java.lang.String template,
         java.lang.Object arg1,
         java.lang.Object arg2,
         java.lang.Object arg3,
         java.lang.Object arg4)
Message template with 4 replacement arguments.


isEnabled

boolean isEnabled(Logging.LogLevel level)
Returns:
true if the specified log level is enabled

notifyLog

void notifyLog(Logging.LogLevel level,
               java.lang.String message)

format1

java.lang.String format1(java.lang.String t,
                         java.lang.Object arg)

format

java.lang.String format(java.lang.String t,
                        scala.collection.Seq<java.lang.Object> arg)