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)
LogSegregationContextsetLogSegregationId in interface LogSegregationContextid - the id to be added to every log line of current threadpublic String getLogSegragationId()
getLogSegragationId in interface LogSegregationContextpublic void setLogSegragationAndQueryId(String id)
LogSegregationContextsetLogSegragationAndQueryId in interface LogSegregationContextid - the query idpublic static void removeLogSegragationIds()
public String getQueryId()
LogSegregationContextgetQueryId in interface LogSegregationContextpublic void setQueryId(String id)
LogSegregationContextsetQueryId in interface LogSegregationContextid - the query idpublic static void remove(String key)
Copyright © 2014–2018 Apache Software Foundation. All rights reserved.