Class ContextMapLookup
- java.lang.Object
-
- org.apache.logging.log4j.core.lookup.ContextMapLookup
-
- All Implemented Interfaces:
StrLookup
@Plugin(name="ctx", category="Lookup") public class ContextMapLookup extends java.lang.Object implements StrLookup
Looks up keys from the context. By default this is theThreadContext, but users may configure a customContextDataInjectorwhich obtains context data from some other source.
-
-
Field Summary
Fields Modifier and Type Field Description private ContextDataInjectorinjector
-
Constructor Summary
Constructors Constructor Description ContextMapLookup()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Stringlookup(java.lang.String key)Looks up the value from the ThreadContext Map.java.lang.Stringlookup(LogEvent event, java.lang.String key)Looks up the value from the ThreadContext Map.
-
-
-
Field Detail
-
injector
private final ContextDataInjector injector
-
-