object MarkerContext extends LowPriorityMarkerContextImplicits

Source
Logger.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. MarkerContext
  2. LowPriorityMarkerContextImplicits
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. implicit val NoMarker: MarkerContext

    A MarkerContext that returns None.

    A MarkerContext that returns None. This is used as the "default" marker context if no implicit MarkerContext is found in local scope (meaning there is nothing defined through import or "implicit val").

    Definition Classes
    LowPriorityMarkerContextImplicits
  2. def apply(marker: Marker): MarkerContext

    Provides an instance of a MarkerContext from a Marker.

    Provides an instance of a MarkerContext from a Marker. The explicit form is useful when you want to explicitly tag a log message with a particular Marker and you already have a Marker in implicit scope.

    implicit val implicitContext: MarkerContext = ...
    val explicitContext: MarkerContext = MarkerContext(MarkerFactory.getMarker("EXPLICITMARKER"))
    
    // do not use the implicit MarkerContext
    log.error("This message is logged with EXPLICITMARKER")(explicitContext)
    marker

    the marker to wrap in DefaultMarkerContext

    returns

    an instance of DefaultMarkerContext.

  3. implicit def markerToMarkerContext(marker: Marker): MarkerContext

    Enables conversion from a marker to a MarkerContext:

    Enables conversion from a marker to a MarkerContext:

    val mc: MarkerContext = MarkerFactory.getMarker("SOMEMARKER")
    marker

    the SLF4J marker to convert

    returns

    the result of MarkerContext.apply(marker)

    Definition Classes
    LowPriorityMarkerContextImplicits