t

akka.event

LoggingAdapter

trait LoggingAdapter extends AnyRef

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)

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

Source
Logging.scala
Linear Supertypes
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. LoggingAdapter
  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. Protected

Type Members

  1. type MDC = Map[String, Any]

Abstract Value Members

  1. abstract def isDebugEnabled: Boolean
  2. abstract def isErrorEnabled: Boolean
  3. abstract def isInfoEnabled: Boolean
  4. abstract def isWarningEnabled: Boolean
  5. abstract def notifyDebug(message: String): Unit
    Attributes
    protected
  6. abstract def notifyError(cause: Throwable, message: String): Unit
    Attributes
    protected
  7. abstract def notifyError(message: String): Unit
    Attributes
    protected
  8. abstract def notifyInfo(message: String): Unit
    Attributes
    protected
  9. abstract def notifyWarning(message: String): Unit
    Attributes
    protected

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String
    Implicit
    This member is added by an implicit conversion from LoggingAdapter toany2stringadd[LoggingAdapter] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (LoggingAdapter, B)
    Implicit
    This member is added by an implicit conversion from LoggingAdapter toArrowAssoc[LoggingAdapter] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  8. 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.

    See also

    LoggingAdapter

  9. 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

    LoggingAdapter

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

    Message template with 2 replacement arguments.

    Message template with 2 replacement arguments.

    See also

    LoggingAdapter

  11. 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

    LoggingAdapter

  12. def debug(message: String): Unit

    Log message at debug level.

    Log message at debug level.

    See also

    LoggingAdapter

  13. def ensuring(cond: (LoggingAdapter) => Boolean, msg: => Any): LoggingAdapter
    Implicit
    This member is added by an implicit conversion from LoggingAdapter toEnsuring[LoggingAdapter] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  14. def ensuring(cond: (LoggingAdapter) => Boolean): LoggingAdapter
    Implicit
    This member is added by an implicit conversion from LoggingAdapter toEnsuring[LoggingAdapter] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  15. def ensuring(cond: Boolean, msg: => Any): LoggingAdapter
    Implicit
    This member is added by an implicit conversion from LoggingAdapter toEnsuring[LoggingAdapter] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  16. def ensuring(cond: Boolean): LoggingAdapter
    Implicit
    This member is added by an implicit conversion from LoggingAdapter toEnsuring[LoggingAdapter] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  17. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  19. 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.

    See also

    LoggingAdapter

  20. 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

    LoggingAdapter

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

    Message template with 2 replacement arguments.

    Message template with 2 replacement arguments.

    See also

    LoggingAdapter

  22. 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

    LoggingAdapter

  23. 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

    LoggingAdapter

  24. 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.

    See also

    LoggingAdapter

  25. 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

    LoggingAdapter

  26. 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

    LoggingAdapter

  27. 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

    LoggingAdapter

  28. 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

    LoggingAdapter

  29. def format(t: String, arg: Any*): String
  30. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  31. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  32. 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.

    See also

    LoggingAdapter

  33. 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

    LoggingAdapter

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

    Message template with 2 replacement arguments.

    Message template with 2 replacement arguments.

    See also

    LoggingAdapter

  35. 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

    LoggingAdapter

  36. def info(message: String): Unit

    Log message at info level.

    Log message at info level.

    See also

    LoggingAdapter

  37. final def isEnabled(level: LogLevel): Boolean

    returns

    true if the specified log level is enabled

  38. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  39. def log(level: LogLevel, template: String, arg1: Any, arg2: Any, arg3: Any, arg4: Any): Unit

    Message template with 4 replacement arguments.

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

    Message template with 3 replacement arguments.

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

    Message template with 2 replacement arguments.

  42. 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.

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

    Log message at the specified log level.

  44. def mdc: Logging.MDC
  45. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  46. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  47. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  48. final def notifyLog(level: LogLevel, message: String): Unit
  49. def notifyWarning(cause: Throwable, message: String): Unit
    Attributes
    protected
  50. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  51. def toString(): String
    Definition Classes
    AnyRef → Any
  52. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  53. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  54. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  55. 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.

    See also

    LoggingAdapter

  56. 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

    LoggingAdapter

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

    Message template with 2 replacement arguments.

    Message template with 2 replacement arguments.

    See also

    LoggingAdapter

  58. 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

    LoggingAdapter

  59. def warning(message: String): Unit

    Log message at warning level.

    Log message at warning level.

    See also

    LoggingAdapter

  60. 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.

    See also

    LoggingAdapter

  61. 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

    LoggingAdapter

  62. 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

    LoggingAdapter

  63. 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

    LoggingAdapter

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

    Log message at warning level, including the exception that indicated the warning.

    Log message at warning level, including the exception that indicated the warning.

    See also

    LoggingAdapter

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated
  2. def formatted(fmtstr: String): String
    Implicit
    This member is added by an implicit conversion from LoggingAdapter toStringFormat[LoggingAdapter] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @deprecated @inline()
    Deprecated

    (Since version 2.12.16) Use formatString.format(value) instead of value.formatted(formatString), or use the f"" string interpolator. In Java 15 and later, formatted resolves to the new method in String which has reversed parameters.

  3. def [B](y: B): (LoggingAdapter, B)
    Implicit
    This member is added by an implicit conversion from LoggingAdapter toArrowAssoc[LoggingAdapter] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @deprecated
    Deprecated

    (Since version 2.13.0) Use -> instead. If you still wish to display it as one character, consider using a font with programming ligatures such as Fira Code.

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd fromLoggingAdapter to any2stringadd[LoggingAdapter]

Inherited by implicit conversion StringFormat fromLoggingAdapter to StringFormat[LoggingAdapter]

Inherited by implicit conversion Ensuring fromLoggingAdapter to Ensuring[LoggingAdapter]

Inherited by implicit conversion ArrowAssoc fromLoggingAdapter to ArrowAssoc[LoggingAdapter]

Ungrouped