Package org.apache.solr.logging
Class MDCLoggingContext
- java.lang.Object
-
- org.apache.solr.logging.MDCLoggingContext
-
public class MDCLoggingContext extends Object
Set's per thread context info for logging. Nested calls will use the top level parent for all context. The first caller always owns the context until it callsclear()
. Always callsetCore(SolrCore)
orsetCoreDescriptor(CoreContainer, CoreDescriptor)
and thenclear()
in a finally block.
-
-
Constructor Summary
Constructors Constructor Description MDCLoggingContext()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
clear()
static void
reset()
static void
setCollection(String collection)
static void
setCore(SolrCore core)
static void
setCoreDescriptor(CoreContainer coreContainer, CoreDescriptor cd)
static void
setCoreName(String core)
static void
setNode(String node)
static void
setNode(CoreContainer cc)
static void
setReplica(String replica)
static void
setShard(String shard)
-
-
-
Method Detail
-
setCollection
public static void setCollection(String collection)
-
setShard
public static void setShard(String shard)
-
setReplica
public static void setReplica(String replica)
-
setCoreName
public static void setCoreName(String core)
-
setNode
public static void setNode(CoreContainer cc)
-
setNode
public static void setNode(String node)
-
setCore
public static void setCore(SolrCore core)
-
setCoreDescriptor
public static void setCoreDescriptor(CoreContainer coreContainer, CoreDescriptor cd)
-
clear
public static void clear()
-
reset
public static void reset()
-
-