implicit final class LoggerOps extends AnyVal
Extension methods to org.slf4j.Logger that are useful because the Scala compiler can't select the right overloaded methods for some cases when using 2 template arguments and varargs (>= 3 arguments) with primitive types.
Enable these extension methods with:
import akka.actor.typed.scaladsl.LoggerOps
or
import akka.actor.typed.scaladsl._
- Source
- package.scala
- Alphabetic
- By Inheritance
- LoggerOps
- AnyVal
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new LoggerOps(log: Logger)
- log
the underlying org.slf4j.Logger
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- Any
- final def ##: Int
- Definition Classes
- Any
- def +(other: String): String
- def ->[B](y: B): (LoggerOps, B)
- final def ==(arg0: Any): Boolean
- Definition Classes
- Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def debug2(marker: Marker, format: String, arg1: Any, arg2: Any): Unit
Log marker data and message at the DEBUG level according to the specified format and 2 arguments.
Log marker data and message at the DEBUG level according to the specified format and 2 arguments.
This form avoids superfluous object creation when the logger is disabled for the DEBUG level.
- marker
the marker data specific to this log statement
- format
the format string
- arg1
the first argument
- arg2
the second argument
- def debug2(format: String, arg1: Any, arg2: Any): Unit
Log a message at the DEBUG level according to the specified format and 2 arguments.
Log a message at the DEBUG level according to the specified format and 2 arguments.
This form avoids superfluous object creation when the logger is disabled for the DEBUG level.
- format
the format string
- arg1
the first argument
- arg2
the second argument
- def debugN(marker: Marker, format: String, arguments: Any*): Unit
Log marker data and message at the DEBUG level according to the specified format and arguments.
Log marker data and message at the DEBUG level according to the specified format and arguments.
This form avoids superfluous string concatenation when the logger is disabled for the DEBUG level. However, this variant incurs the hidden (and relatively small) cost of creating an
Array[Object]
before invoking the method, even if this logger is disabled for DEBUG. Thedebug
variants taking one anddebug2
taking two arguments exist solely in order to avoid this hidden cost.- format
the format string
- arguments
a list of 3 or more arguments
- def debugN(format: String, arguments: Any*): Unit
Log a message at the DEBUG level according to the specified format and arguments.
Log a message at the DEBUG level according to the specified format and arguments.
This form avoids superfluous string concatenation when the logger is disabled for the DEBUG level. However, this variant incurs the hidden (and relatively small) cost of creating an
Array[Object]
before invoking the method, even if this logger is disabled for DEBUG. Thedebug
variants taking one anddebug2
taking two arguments exist solely in order to avoid this hidden cost.- format
the format string
- arguments
a list of 3 or more arguments
- def ensuring(cond: (LoggerOps) => Boolean, msg: => Any): LoggerOps
- def ensuring(cond: (LoggerOps) => Boolean): LoggerOps
- def ensuring(cond: Boolean, msg: => Any): LoggerOps
- def ensuring(cond: Boolean): LoggerOps
- def error2(marker: Marker, format: String, arg1: Any, arg2: Any): Unit
Log marker data and message at the ERROR level according to the specified format and 2 arguments.
Log marker data and message at the ERROR level according to the specified format and 2 arguments.
This form avoids superfluous object creation when the logger is disabled for the ERROR level.
- marker
the marker data specific to this log statement
- format
the format string
- arg1
the first argument
- arg2
the second argument
- def error2(format: String, arg1: Any, arg2: Any): Unit
Log a message at the ERROR level according to the specified format and 2 arguments.
Log a message at the ERROR level according to the specified format and 2 arguments.
This form avoids superfluous object creation when the logger is disabled for the ERROR level.
- format
the format string
- arg1
the first argument
- arg2
the second argument
- def errorN(marker: Marker, format: String, arguments: Any*): Unit
Log marker data and message at the ERROR level according to the specified format and arguments.
Log marker data and message at the ERROR level according to the specified format and arguments.
This form avoids superfluous string concatenation when the logger is disabled for the ERROR level. However, this variant incurs the hidden (and relatively small) cost of creating an
Array[Object]
before invoking the method, even if this logger is disabled for ERROR. Theerror
variants taking one anderror2
taking two arguments exist solely in order to avoid this hidden cost.- format
the format string
- arguments
a list of 3 or more arguments
- def errorN(format: String, arguments: Any*): Unit
Log a message at the ERROR level according to the specified format and arguments.
Log a message at the ERROR level according to the specified format and arguments.
This form avoids superfluous string concatenation when the logger is disabled for the ERROR level. However, this variant incurs the hidden (and relatively small) cost of creating an
Array[Object]
before invoking the method, even if this logger is disabled for ERROR. Theerror
variants taking one anderror2
taking two arguments exist solely in order to avoid this hidden cost.- format
the format string
- arguments
a list of 3 or more arguments
- def getClass(): Class[_ <: AnyVal]
- Definition Classes
- AnyVal → Any
- def info2(marker: Marker, format: String, arg1: Any, arg2: Any): Unit
Log marker data and message at the INFO level according to the specified format and 2 arguments.
Log marker data and message at the INFO level according to the specified format and 2 arguments.
This form avoids superfluous object creation when the logger is disabled for the INFO level.
- marker
the marker data specific to this log statement
- format
the format string
- arg1
the first argument
- arg2
the second argument
- def info2(format: String, arg1: Any, arg2: Any): Unit
Log a message at the INFO level according to the specified format and 2 arguments.
Log a message at the INFO level according to the specified format and 2 arguments.
This form avoids superfluous object creation when the logger is disabled for the INFO level.
- format
the format string
- arg1
the first argument
- arg2
the second argument
- def infoN(marker: Marker, format: String, arguments: Any*): Unit
Log marker data and message at the INFO level according to the specified format and arguments.
Log marker data and message at the INFO level according to the specified format and arguments.
This form avoids superfluous string concatenation when the logger is disabled for the INFO level. However, this variant incurs the hidden (and relatively small) cost of creating an
Array[Object]
before invoking the method, even if this logger is disabled for INFO. Theinfo
variants taking one andinfo2
taking two arguments exist solely in order to avoid this hidden cost.- format
the format string
- arguments
a list of 3 or more arguments
- def infoN(format: String, arguments: Any*): Unit
Log a message at the INFO level according to the specified format and arguments.
Log a message at the INFO level according to the specified format and arguments.
This form avoids superfluous string concatenation when the logger is disabled for the INFO level. However, this variant incurs the hidden (and relatively small) cost of creating an
Array[Object]
before invoking the method, even if this logger is disabled for INFO. Theinfo
variants taking one andinfo2
taking two arguments exist solely in order to avoid this hidden cost.- format
the format string
- arguments
a list of 3 or more arguments
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val log: Logger
- def toString(): String
- Definition Classes
- Any
- def trace2(marker: Marker, format: String, arg1: Any, arg2: Any): Unit
Log marker data and message at the TRACE level according to the specified format and 2 arguments.
Log marker data and message at the TRACE level according to the specified format and 2 arguments.
This form avoids superfluous object creation when the logger is disabled for the TRACE level.
- marker
the marker data specific to this log statement
- format
the format string
- arg1
the first argument
- arg2
the second argument
- def trace2(format: String, arg1: Any, arg2: Any): Unit
Log a message at the TRACE level according to the specified format and 2 arguments.
Log a message at the TRACE level according to the specified format and 2 arguments.
This form avoids superfluous object creation when the logger is disabled for the TRACE level.
- format
the format string
- arg1
the first argument
- arg2
the second argument
- def traceN(marker: Marker, format: String, arguments: Any*): Unit
Log marker data and message at the TRACE level according to the specified format and arguments.
Log marker data and message at the TRACE level according to the specified format and arguments.
This form avoids superfluous string concatenation when the logger is disabled for the TRACE level. However, this variant incurs the hidden (and relatively small) cost of creating an
Array[Object]
before invoking the method, even if this logger is disabled for TRACE. Thetrace
variants taking one andtrace2
taking two arguments exist solely in order to avoid this hidden cost.- format
the format string
- arguments
a list of 3 or more arguments
- def traceN(format: String, arguments: Any*): Unit
Log a message at the TRACE level according to the specified format and arguments.
Log a message at the TRACE level according to the specified format and arguments.
This form avoids superfluous string concatenation when the logger is disabled for the TRACE level. However, this variant incurs the hidden (and relatively small) cost of creating an
Array[Object]
before invoking the method, even if this logger is disabled for TRACE. Thetrace
variants taking one andtrace2
taking two arguments exist solely in order to avoid this hidden cost.- format
the format string
- arguments
a list of 3 or more arguments
- def warn2(marker: Marker, format: String, arg1: Any, arg2: Any): Unit
Log marker data and message at the WARN level according to the specified format and 2 arguments.
Log marker data and message at the WARN level according to the specified format and 2 arguments.
This form avoids superfluous object creation when the logger is disabled for the WARN level.
- marker
the marker data specific to this log statement
- format
the format string
- arg1
the first argument
- arg2
the second argument
- def warn2(format: String, arg1: Any, arg2: Any): Unit
Log a message at the WARN level according to the specified format and 2 arguments.
Log a message at the WARN level according to the specified format and 2 arguments.
This form avoids superfluous object creation when the logger is disabled for the WARN level.
- format
the format string
- arg1
the first argument
- arg2
the second argument
- def warnN(marker: Marker, format: String, arguments: Any*): Unit
Log marker data and message at the WARN level according to the specified format and arguments.
Log marker data and message at the WARN level according to the specified format and arguments.
This form avoids superfluous string concatenation when the logger is disabled for the WARN level. However, this variant incurs the hidden (and relatively small) cost of creating an
Array[Object]
before invoking the method, even if this logger is disabled for WARN. Thewarn
variants taking one andwarn2
taking two arguments exist solely in order to avoid this hidden cost.- format
the format string
- arguments
a list of 3 or more arguments
- def warnN(format: String, arguments: Any*): Unit
Log a message at the WARN level according to the specified format and arguments.
Log a message at the WARN level according to the specified format and arguments.
This form avoids superfluous string concatenation when the logger is disabled for the WARN level. However, this variant incurs the hidden (and relatively small) cost of creating an
Array[Object]
before invoking the method, even if this logger is disabled for WARN. Thewarn
variants taking one andwarn2
taking two arguments exist solely in order to avoid this hidden cost.- format
the format string
- arguments
a list of 3 or more arguments
Deprecated Value Members
- def formatted(fmtstr: String): String
- Implicit
- This member is added by an implicit conversion from LoggerOps toStringFormat[LoggerOps] performed by method StringFormat in scala.Predef.
- Definition Classes
- StringFormat
- Annotations
- @deprecated @inline()
- Deprecated
(Since version 2.12.16) Use
formatString.format(value)
instead ofvalue.formatted(formatString)
, or use thef""
string interpolator. In Java 15 and later,formatted
resolves to the new method in String which has reversed parameters.
- def →[B](y: B): (LoggerOps, B)
- Implicit
- This member is added by an implicit conversion from LoggerOps toArrowAssoc[LoggerOps] 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.