final class FinagleMDCAdapter extends MDCAdapter
Implementation of the org.slf4j.spi.MDCAdapter which stores the backing map as a com.twitter.finagle.context.LocalContext via a com.twitter.finagle.context.Contexts.local.
- Note
Users are not expected to interact with this MDCAdapter directly. Users should use the framework MDC API, via com.twitter.inject.logging.MDCInitializer.
,if access to the org.slf4j.MDC is done without first calling com.twitter.inject.logging.MDCInitializer.let these operations are all effectively no-ops.
- See also
com.twitter.finagle.context.Contexts.local
com.twitter.finagle.context.LocalContext
- Alphabetic
- By Inheritance
- FinagleMDCAdapter
- MDCAdapter
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new FinagleMDCAdapter()
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clear(): Unit
Clear all entries in the MDC.
Clear all entries in the MDC.
- Definition Classes
- FinagleMDCAdapter → MDCAdapter
- See also
org.slf4j.spi.MDCAdapter#clear
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
get(key: String): String
Get the context identified by the key parameter.
Get the context identified by the key parameter. The key parameter cannot be null.
- returns
the string value identified by the key parameter.
- Definition Classes
- FinagleMDCAdapter → MDCAdapter
- See also
org.slf4j.spi.MDCAdapter#get
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
getCopyOfContextMap(): Map[String, String]
Return a copy of the current thread's context map, with keys and values of type String.
Return a copy of the current thread's context map, with keys and values of type String. Returned value may be null.
- returns
A copy of the current thread's context map. May be null.
- Definition Classes
- FinagleMDCAdapter → MDCAdapter
- See also
org.slf4j.spi.MDCAdapter#getCopyOfContextMap
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
put(key: String, value: String): Unit
Put a context value (the val parameter) as identified with the key parameter into the current thread's context map.
Put a context value (the val parameter) as identified with the key parameter into the current thread's context map. The key parameter cannot be null. The val parameter can be null only if the underlying implementation supports it.
If the current thread does not have a context map it is created as a side effect of this call.
- Definition Classes
- FinagleMDCAdapter → MDCAdapter
- See also
org.slf4j.spi.MDCAdapter#put
-
def
remove(key: String): Unit
Remove the the context identified by the key parameter.
Remove the the context identified by the key parameter. The key parameter cannot be null. This method does nothing if there is no previous value associated with key.
- Definition Classes
- FinagleMDCAdapter → MDCAdapter
- See also
org.slf4j.spi.MDCAdapter#remove
-
def
setContextMap(contextMap: Map[String, String]): Unit
Set the current thread's context map by first clearing any existing map and then copying the map passed as parameter.
Set the current thread's context map by first clearing any existing map and then copying the map passed as parameter. The context map parameter must only contain keys and values of type String.
- contextMap
must contain only keys and values of type String
- Definition Classes
- FinagleMDCAdapter → MDCAdapter
- See also
org.slf4j.spi.MDCAdapter#setContextMap
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )