public class MappedDiagnosticLogSegregationContext extends Object implements LogSegregationContext
Modifier and Type | Field and Description |
---|---|
static String |
LOG_SEGREGATION_ID |
static String |
QUERY_LOG_ID |
Constructor and Description |
---|
MappedDiagnosticLogSegregationContext() |
Modifier and Type | Method and Description |
---|---|
String |
getLogSegragationId() |
String |
getQueryId()
Get current query id in log segregation
|
static void |
put(String key,
String value) |
static void |
remove(String key) |
static void |
removeLogSegragationIds() |
void |
setLogSegragationAndQueryId(String id)
Sets query id to be used by current thread for log segregation for identifying current query.
|
void |
setLogSegregationId(String id)
Sets an id to be used by current thread in every log line for log segregation
|
void |
setQueryId(String id)
Sets query id to be used by current thread for log segregation for identifying current query.
|
public static final String LOG_SEGREGATION_ID
public static final String QUERY_LOG_ID
public MappedDiagnosticLogSegregationContext()
public void setLogSegregationId(String id)
LogSegregationContext
setLogSegregationId
in interface LogSegregationContext
id
- the id to be added to every log line of current threadpublic String getLogSegragationId()
getLogSegragationId
in interface LogSegregationContext
public void setLogSegragationAndQueryId(String id)
LogSegregationContext
setLogSegragationAndQueryId
in interface LogSegregationContext
id
- the query idpublic static void removeLogSegragationIds()
public String getQueryId()
LogSegregationContext
getQueryId
in interface LogSegregationContext
public void setQueryId(String id)
LogSegregationContext
setQueryId
in interface LogSegregationContext
id
- the query idpublic static void remove(String key)
Copyright © 2014–2018 Apache Software Foundation. All rights reserved.