trait WhenEnabledLogBuilder[F[_]] extends AnyRef

A part of logging API for a specific logging level. This trait is useful in case when logging becomes expensive. It allows one to perform logging only when we need to, and not do anything when logging for specific combination of logger and logging level is turned off.

Self Type
WhenEnabledLogBuilder[F]
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. WhenEnabledLogBuilder
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def apply(f: (LogBuilder[F]) ⇒ F[Unit]): F[Unit]

    Basic building block.

    Basic building block. If target combination of logger and logging level is turned off, it return immediately, otherwise it executes provided callback.

    f

    callback to be used when logging is enabled

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  6. def computeArg[T](key: String)(fv: F[T])(implicit arg0: LogEncoder[T], F: FlatMap[F]): WhenEnabledLogBuilder[F]

    Extends current logging statement with structured argument.

    Extends current logging statement with structured argument. This argument might be expensive to compute, so it's wrapped inside an effect. The effect is only evaluated if need, which means only when target logging level is enabled.

    T

    type of structured argument. It needs to implement LogEncoder typeclass.

    key

    name of the argument

    fv

    value to be used as structured argument wrapped inside an effect

    returns

    a new WhenEnabledLogBuilder instance that will append structured argument lazily

  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  9. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  11. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  12. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  13. def log(ex: Throwable, msg: String)(implicit location: Location): F[Unit]

    Log simple message with an exception and no message specific structured argument.

    Log simple message with an exception and no message specific structured argument.

    ex

    exception to be logged

    msg

    message to be logged

  14. def log(msg: String)(implicit location: Location): F[Unit]

    Log simple message with no exception nor message specific structured argument.

    Log simple message with no exception nor message specific structured argument.

    msg

    message to be logged

  15. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  16. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  17. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  18. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  19. def toString(): String
    Definition Classes
    AnyRef → Any
  20. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  21. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  22. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  23. def withArg[T](key: String, value: ⇒ T)(implicit arg0: LogEncoder[T]): WhenEnabledLogBuilder[F]

    Extends current logging statement with structured data.

    Extends current logging statement with structured data. This is lazy variant that checks if target logging level is enabled before actually doing anything.

    T

    type of structured argument. It needs to implement LogEncoder typeclass.

    key

    name of the argument

    value

    value to be used as structured argument

    returns

    a new WhenEnabledLogBuilder instance that will append structured argument lazily

Inherited from AnyRef

Inherited from Any

Ungrouped