abstract class Logger extends AnyRef

Logging API provided inside of actors through the actor context.

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

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

More than four arguments can be defined by using an Array with the method with one argument parameter.

*Rationale for an Akka-specific logging API:* Provided rather than a specific logging library logging API to not enforce a specific logging library on users but still providing a convenient, performant, asynchronous and testable logging solution. Additionally it allows unified logging for both user implemented actors and built in Akka actors where the actual logging backend can be selected by the user. This logging facade is also used by Akka internally, without having to depend on specific logging frameworks.

The Logger of an actor is tied to the actor path and should not be shared with other threads outside of the actor.

Not for user extension

Annotations
@DoNotInherit()
Source
Logger.scala
Linear Supertypes
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Logger
  2. AnyRef
  3. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def debug(marker: LogMarker, template: String, arg1: Any, arg2: Any, arg3: Any, arg4: Any): Unit

    Message template with 4 replacement arguments.

    Message template with 4 replacement arguments. For more parameters see the single replacement version of this method.

    The marker argument can be picked up by various logging frameworks such as slf4j to mark this log statement as "special".

    See also

    Logger

  2. abstract def debug(marker: LogMarker, template: String, arg1: Any, arg2: Any, arg3: Any): Unit

    Message template with 3 replacement arguments.

    Message template with 3 replacement arguments.

    The marker argument can be picked up by various logging frameworks such as slf4j to mark this log statement as "special".

    See also

    Logger

  3. abstract def debug(marker: LogMarker, template: String, arg1: Any, arg2: Any): Unit

    Message template with 2 replacement arguments.

    Message template with 2 replacement arguments.

    The marker argument can be picked up by various logging frameworks such as slf4j to mark this log statement as "special".

    See also

    Logger

  4. abstract def debug(marker: LogMarker, template: String, arg1: Any): Unit

    Message template with 1 replacement argument.

    Message template with 1 replacement argument.

    The marker argument can be picked up by various logging frameworks such as slf4j to mark this log statement as "special".

    If arg1 is an Array it will be expanded into replacement arguments, which is useful when there are more than four arguments.

    See also

    Logger

  5. abstract def debug(marker: LogMarker, message: String): Unit

    Log message at debug level.

    Log message at debug level.

    The marker argument can be picked up by various logging frameworks such as slf4j to mark this log statement as "special".

    See also

    Logger

  6. abstract def debug(template: String, arg1: Any, arg2: Any, arg3: Any, arg4: Any): Unit

    Message template with 4 replacement arguments.

    Message template with 4 replacement arguments. For more parameters see the single replacement version of this method.

    See also

    Logger

  7. abstract def debug(template: String, arg1: Any, arg2: Any, arg3: Any): Unit

    Message template with 3 replacement arguments.

    Message template with 3 replacement arguments.

    See also

    Logger

  8. abstract def debug(template: String, arg1: Any, arg2: Any): Unit

    Message template with 2 replacement arguments.

    Message template with 2 replacement arguments.

    See also

    Logger

  9. abstract def debug(template: String, arg1: Any): Unit

    Message template with 1 replacement argument.

    Message template with 1 replacement argument.

    If arg1 is an Array it will be expanded into replacement arguments, which is useful when there are more than four arguments.

    See also

    Logger

  10. abstract def debug(message: String): Unit

    Log message at debug level.

    Log message at debug level.

    See also

    Logger

  11. abstract def error(marker: LogMarker, template: String, arg1: Any, arg2: Any, arg3: Any, arg4: Any): Unit

    Message template with 4 replacement arguments.

    Message template with 4 replacement arguments. For more parameters see the single replacement version of this method.

    The marker argument can be picked up by various logging frameworks such as slf4j to mark this log statement as "special".

    See also

    Logger

  12. abstract def error(marker: LogMarker, template: String, arg1: Any, arg2: Any, arg3: Any): Unit

    Message template with 3 replacement arguments.

    Message template with 3 replacement arguments.

    The marker argument can be picked up by various logging frameworks such as slf4j to mark this log statement as "special".

    See also

    Logger

  13. abstract def error(marker: LogMarker, template: String, arg1: Any, arg2: Any): Unit

    Message template with 2 replacement arguments.

    Message template with 2 replacement arguments.

    The marker argument can be picked up by various logging frameworks such as slf4j to mark this log statement as "special".

    See also

    Logger

  14. abstract def error(marker: LogMarker, template: String, arg1: Any): Unit

    Message template with 1 replacement argument.

    Message template with 1 replacement argument.

    The marker argument can be picked up by various logging frameworks such as slf4j to mark this log statement as "special".

    If arg1 is an Array it will be expanded into replacement arguments, which is useful when there are more than four arguments.

    See also

    Logger

  15. abstract def error(marker: LogMarker, message: String): Unit

    Log message at error level, without providing the exception that caused the error.

    Log message at error level, without providing the exception that caused the error.

    The marker argument can be picked up by various logging frameworks such as slf4j to mark this log statement as "special".

    See also

    Logger

  16. abstract def error(marker: LogMarker, cause: Throwable, template: String, arg1: Any, arg2: Any, arg3: Any, arg4: Any): Unit

    Message template with 4 replacement arguments.

    Message template with 4 replacement arguments. For more parameters see the single replacement version of this method.

    See also

    Logger

  17. abstract def error(marker: LogMarker, cause: Throwable, template: String, arg1: Any, arg2: Any, arg3: Any): Unit

    Message template with 3 replacement arguments.

    Message template with 3 replacement arguments.

    See also

    Logger

  18. abstract def error(marker: LogMarker, cause: Throwable, template: String, arg1: Any, arg2: Any): Unit

    Message template with 2 replacement arguments.

    Message template with 2 replacement arguments.

    See also

    Logger

  19. abstract def error(marker: LogMarker, cause: Throwable, template: String, arg1: Any): Unit

    Message template with 1 replacement argument.

    Message template with 1 replacement argument.

    If arg1 is an Array it will be expanded into replacement arguments, which is useful when there are more than four arguments.

    See also

    Logger

  20. abstract def error(marker: LogMarker, cause: Throwable, message: String): Unit

    Log message at error level, including the exception that caused the error.

    Log message at error level, including the exception that caused the error.

    See also

    Logger

  21. abstract def error(cause: Throwable, template: String, arg1: Any, arg2: Any, arg3: Any, arg4: Any): Unit

    Message template with 4 replacement arguments.

    Message template with 4 replacement arguments. For more parameters see the single replacement version of this method.

    See also

    Logger

  22. abstract def error(cause: Throwable, template: String, arg1: Any, arg2: Any, arg3: Any): Unit

    Message template with 3 replacement arguments.

    Message template with 3 replacement arguments.

    See also

    Logger

  23. abstract def error(cause: Throwable, template: String, arg1: Any, arg2: Any): Unit

    Message template with 2 replacement arguments.

    Message template with 2 replacement arguments.

    See also

    Logger

  24. abstract def error(cause: Throwable, template: String, arg1: Any): Unit

    Message template with 1 replacement argument.

    Message template with 1 replacement argument.

    If arg1 is an Array it will be expanded into replacement arguments, which is useful when there are more than four arguments.

    See also

    Logger

  25. abstract def error(cause: Throwable, message: String): Unit

    Log message at error level, including the exception that caused the error.

    Log message at error level, including the exception that caused the error.

    See also

    Logger

  26. abstract def error(template: String, arg1: Any, arg2: Any, arg3: Any, arg4: Any): Unit

    Message template with 4 replacement arguments.

    Message template with 4 replacement arguments. For more parameters see the single replacement version of this method.

    See also

    Logger

  27. abstract def error(template: String, arg1: Any, arg2: Any, arg3: Any): Unit

    Message template with 3 replacement arguments.

    Message template with 3 replacement arguments.

    See also

    Logger

  28. abstract def error(template: String, arg1: Any, arg2: Any): Unit

    Message template with 2 replacement arguments.

    Message template with 2 replacement arguments.

    See also

    Logger

  29. abstract def error(template: String, arg1: Any): Unit

    Message template with 1 replacement argument.

    Message template with 1 replacement argument.

    If arg1 is an Array it will be expanded into replacement arguments, which is useful when there are more than four arguments.

    See also

    Logger

  30. abstract def error(message: String): Unit

    Log message at error level, without providing the exception that caused the error.

    Log message at error level, without providing the exception that caused the error.

    See also

    Logger

  31. abstract def info(marker: LogMarker, template: String, arg1: Any, arg2: Any, arg3: Any, arg4: Any): Unit

    Message template with 4 replacement arguments.

    Message template with 4 replacement arguments. For more parameters see the single replacement version of this method.

    The marker argument can be picked up by various logging frameworks such as slf4j to mark this log statement as "special".

    See also

    Logger

  32. abstract def info(marker: LogMarker, template: String, arg1: Any, arg2: Any, arg3: Any): Unit

    Message template with 3 replacement arguments.

    Message template with 3 replacement arguments.

    The marker argument can be picked up by various logging frameworks such as slf4j to mark this log statement as "special".

    See also

    Logger

  33. abstract def info(marker: LogMarker, template: String, arg1: Any, arg2: Any): Unit

    Message template with 2 replacement arguments.

    Message template with 2 replacement arguments.

    The marker argument can be picked up by various logging frameworks such as slf4j to mark this log statement as "special".

    See also

    Logger

  34. abstract def info(marker: LogMarker, template: String, arg1: Any): Unit

    Message template with 1 replacement argument.

    Message template with 1 replacement argument.

    The marker argument can be picked up by various logging frameworks such as slf4j to mark this log statement as "special".

    If arg1 is an Array it will be expanded into replacement arguments, which is useful when there are more than four arguments.

    See also

    Logger

  35. abstract def info(marker: LogMarker, message: String): Unit

    Log message at info level.

    Log message at info level.

    The marker argument can be picked up by various logging frameworks such as slf4j to mark this log statement as "special".

    See also

    Logger

  36. abstract def info(template: String, arg1: Any, arg2: Any, arg3: Any, arg4: Any): Unit

    Message template with 4 replacement arguments.

    Message template with 4 replacement arguments. For more parameters see the single replacement version of this method.

    See also

    Logger

  37. abstract def info(template: String, arg1: Any, arg2: Any, arg3: Any): Unit

    Message template with 3 replacement arguments.

    Message template with 3 replacement arguments.

    See also

    Logger

  38. abstract def info(template: String, arg1: Any, arg2: Any): Unit

    Message template with 2 replacement arguments.

    Message template with 2 replacement arguments.

    See also

    Logger

  39. abstract def info(template: String, arg1: Any): Unit

    Message template with 1 replacement argument.

    Message template with 1 replacement argument.

    If arg1 is an Array it will be expanded into replacement arguments, which is useful when there are more than four arguments.

    See also

    Logger

  40. abstract def info(message: String): Unit

    Log message at info level.

    Log message at info level.

    See also

    Logger

  41. abstract def isDebugEnabled: Boolean

    Whether debug logging is enabled on the actor system level, may not represent the setting all the way to the logger implementation, but when it does it allows avoiding unnecessary resource usage for log entries that will not actually end up in any logger output.

  42. abstract def isErrorEnabled: Boolean

    Whether error logging is enabled on the actor system level, may not represent the setting all the way to the logger implementation, but when it does it allows avoiding unnecessary resource usage for log entries that will not actually end up in any logger output.

  43. abstract def isInfoEnabled: Boolean

    Whether info logging is enabled on the actor system level, may not represent the setting all the way to the logger implementation, but when it does it allows avoiding unnecessary resource usage for log entries that will not actually end up in any logger output.

  44. abstract def isWarningEnabled: Boolean

    Whether error logging is enabled on the actor system level, may not represent the setting all the way to the logger implementation, but when it does it allows avoiding unnecessary resource usage for log entries that will not actually end up in any logger output.

  45. abstract def log(level: LogLevel, marker: LogMarker, template: String, arg1: Any, arg2: Any, arg3: Any, arg4: Any): Unit

    Message template with 4 replacement arguments.

    Message template with 4 replacement arguments. For more parameters see the single replacement version of this method.

    The marker argument can be picked up by various logging frameworks such as slf4j to mark this log statement as "special".

    See also

    Logger

  46. abstract def log(level: LogLevel, marker: LogMarker, template: String, arg1: Any, arg2: Any, arg3: Any): Unit

    Message template with 3 replacement arguments.

    Message template with 3 replacement arguments.

    The marker argument can be picked up by various logging frameworks such as slf4j to mark this log statement as "special".

    See also

    Logger

  47. abstract def log(level: LogLevel, marker: LogMarker, template: String, arg1: Any, arg2: Any): Unit

    Message template with 2 replacement arguments.

    Message template with 2 replacement arguments.

    The marker argument can be picked up by various logging frameworks such as slf4j to mark this log statement as "special".

    See also

    Logger

  48. abstract def log(level: LogLevel, marker: LogMarker, template: String, arg1: Any): Unit

    Message template with 1 replacement argument.

    Message template with 1 replacement argument.

    The marker argument can be picked up by various logging frameworks such as slf4j to mark this log statement as "special".

    If arg1 is an Array it will be expanded into replacement arguments, which is useful when there are more than four arguments.

    See also

    Logger

  49. abstract def log(level: LogLevel, marker: LogMarker, message: String): Unit

    Log message at the specified level.

    Log message at the specified level.

    The marker argument can be picked up by various logging frameworks such as slf4j to mark this log statement as "special".

    See also

    Logger

  50. abstract def log(level: LogLevel, template: String, arg1: Any, arg2: Any, arg3: Any, arg4: Any): Unit

    Message template with 4 replacement arguments.

    Message template with 4 replacement arguments. For more parameters see the single replacement version of this method.

    See also

    Logger

  51. abstract def log(level: LogLevel, template: String, arg1: Any, arg2: Any, arg3: Any): Unit

    Message template with 3 replacement arguments.

    Message template with 3 replacement arguments.

    See also

    Logger

  52. abstract def log(level: LogLevel, template: String, arg1: Any, arg2: Any): Unit

    Message template with 2 replacement arguments.

    Message template with 2 replacement arguments.

    See also

    Logger

  53. abstract def log(level: LogLevel, template: String, arg1: Any): Unit

    Message template with 1 replacement argument.

    Message template with 1 replacement argument.

    If arg1 is an Array it will be expanded into replacement arguments, which is useful when there are more than four arguments.

    See also

    Logger

  54. abstract def log(level: LogLevel, message: String): Unit

    Log message at the specified level.

    Log message at the specified level.

    See also

    Logger

  55. abstract def warning(marker: LogMarker, cause: Throwable, template: String, arg1: Any, arg2: Any, arg3: Any, arg4: Any): Unit

    Message template with 4 replacement arguments.

    Message template with 4 replacement arguments. For more parameters see the single replacement version of this method.

    The marker argument can be picked up by various logging frameworks such as slf4j to mark this log statement as "special".

    See also

    Logger

  56. abstract def warning(marker: LogMarker, cause: Throwable, template: String, arg1: Any, arg2: Any, arg3: Any): Unit

    Message template with 3 replacement arguments.

    Message template with 3 replacement arguments.

    The marker argument can be picked up by various logging frameworks such as slf4j to mark this log statement as "special".

    See also

    Logger

  57. abstract def warning(marker: LogMarker, cause: Throwable, template: String, arg1: Any, arg2: Any): Unit

    Message template with 2 replacement arguments.

    Message template with 2 replacement arguments.

    The marker argument can be picked up by various logging frameworks such as slf4j to mark this log statement as "special".

    See also

    Logger

  58. abstract def warning(marker: LogMarker, cause: Throwable, template: String, arg1: Any): Unit

    Message template with 1 replacement argument.

    Message template with 1 replacement argument.

    The marker argument can be picked up by various logging frameworks such as slf4j to mark this log statement as "special".

    If arg1 is an Array it will be expanded into replacement arguments, which is useful when there are more than four arguments.

    See also

    Logger

  59. abstract def warning(marker: LogMarker, cause: Throwable, message: String): Unit

    Log message at warning level.

    Log message at warning level.

    The marker argument can be picked up by various logging frameworks such as slf4j to mark this log statement as "special".

    See also

    Logger

  60. abstract def warning(marker: LogMarker, template: String, arg1: Any, arg2: Any, arg3: Any, arg4: Any): Unit

    Message template with 4 replacement arguments.

    Message template with 4 replacement arguments. For more parameters see the single replacement version of this method.

    See also

    Logger

  61. abstract def warning(marker: LogMarker, template: String, arg1: Any, arg2: Any, arg3: Any): Unit

    Message template with 3 replacement arguments.

    Message template with 3 replacement arguments.

    The marker argument can be picked up by various logging frameworks such as slf4j to mark this log statement as "special".

    See also

    Logger

  62. abstract def warning(marker: LogMarker, template: String, arg1: Any, arg2: Any): Unit

    Message template with 2 replacement arguments.

    Message template with 2 replacement arguments.

    The marker argument can be picked up by various logging frameworks such as slf4j to mark this log statement as "special".

    See also

    Logger

  63. abstract def warning(marker: LogMarker, template: String, arg1: Any): Unit

    Message template with 1 replacement argument.

    Message template with 1 replacement argument.

    The marker argument can be picked up by various logging frameworks such as slf4j to mark this log statement as "special".

    If arg1 is an Array it will be expanded into replacement arguments, which is useful when there are more than four arguments.

    See also

    Logger

  64. abstract def warning(marker: LogMarker, message: String): Unit

    Log message at warning level.

    Log message at warning level.

    The marker argument can be picked up by various logging frameworks such as slf4j to mark this log statement as "special".

  65. abstract def warning(cause: Throwable, template: String, arg1: Any, arg2: Any, arg3: Any, arg4: Any): Unit

    Message template with 4 replacement arguments.

    Message template with 4 replacement arguments. For more parameters see the single replacement version of this method.

    See also

    Logger

  66. abstract def warning(cause: Throwable, template: String, arg1: Any, arg2: Any, arg3: Any): Unit

    Message template with 3 replacement arguments.

    Message template with 3 replacement arguments.

    See also

    Logger

  67. abstract def warning(cause: Throwable, template: String, arg1: Any, arg2: Any): Unit

    Message template with 2 replacement arguments.

    Message template with 2 replacement arguments.

    See also

    Logger

  68. abstract def warning(cause: Throwable, template: String, arg1: Any): Unit

    Message template with 1 replacement argument.

    Message template with 1 replacement argument.

    If arg1 is an Array it will be expanded into replacement arguments, which is useful when there are more than four arguments.

    See also

    Logger

  69. abstract def warning(cause: Throwable, message: String): Unit

    Log message at warning level.

  70. abstract def warning(template: String, arg1: Any, arg2: Any, arg3: Any, arg4: Any): Unit

    Message template with 4 replacement arguments.

    Message template with 4 replacement arguments. For more parameters see the single replacement version of this method.

    See also

    Logger

  71. abstract def warning(template: String, arg1: Any, arg2: Any, arg3: Any): Unit

    Message template with 3 replacement arguments.

    Message template with 3 replacement arguments.

    See also

    Logger

  72. abstract def warning(template: String, arg1: Any, arg2: Any): Unit

    Message template with 2 replacement arguments.

    Message template with 2 replacement arguments.

    See also

    Logger

  73. abstract def warning(template: String, arg1: Any): Unit

    Message template with 1 replacement argument.

    Message template with 1 replacement argument.

    If arg1 is an Array it will be expanded into replacement arguments, which is useful when there are more than four arguments.

    See also

    Logger

  74. abstract def warning(message: String): Unit

    Log message at warning level.

  75. abstract def withMdc(mdc: Map[String, Any]): Logger

    Java API: the returned logger will add the given MDC (Mapped Diagnostic Context) to any log entry logged

    Java API: the returned logger will add the given MDC (Mapped Diagnostic Context) to any log entry logged

    See also akka.actor.typed.javadsl.Behaviors.withMdc

  76. abstract def withMdc(mdc: Map[String, Any]): Logger

    Scala API: the returned logger will add the given MDC (Mapped Diagnostic Context) to any log entry logged

    Scala API: the returned logger will add the given MDC (Mapped Diagnostic Context) to any log entry logged

    See also akka.actor.typed.scaladsl.Behaviors.withMdc

Concrete Value Members

  1. def isLevelEnabled(logLevel: LogLevel): Boolean

    Whether a log level is enabled on the actor system level, may not represent the setting all the way to the logger implementation, but when it does it allows avoiding unnecessary resource usage for log entries that will not actually end up in any logger output.