mirror of https://github.com/apache/lucene.git
SOLR-7425: Improve MDC based logging format.
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1676103 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c3185b5489
commit
3862c52b58
|
@ -231,6 +231,8 @@ Other Changes
|
|||
* SOLR-5213: Log when shard splitting unexpectedly leads to documents going to
|
||||
no or multiple shards (Christine Poerschke, Ramkumar Aiyengar)
|
||||
|
||||
* SOLR-7425: Improve MDC based logging format. (Mark Miller)
|
||||
|
||||
================== 5.1.0 ==================
|
||||
|
||||
Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release
|
||||
|
|
|
@ -365,19 +365,19 @@ public class SolrLogLayout extends Layout {
|
|||
|
||||
private void appendMDC(StringBuilder sb) {
|
||||
if (!StringUtils.isEmpty(MDC.get(NODE_NAME_PROP))) {
|
||||
sb.append(" N:").append(MDC.get(NODE_NAME_PROP));
|
||||
sb.append(" n:").append(MDC.get(NODE_NAME_PROP));
|
||||
}
|
||||
if (!StringUtils.isEmpty(MDC.get(COLLECTION_PROP))) {
|
||||
sb.append(" C:").append(MDC.get(COLLECTION_PROP));
|
||||
sb.append(" c:").append(MDC.get(COLLECTION_PROP));
|
||||
}
|
||||
if (!StringUtils.isEmpty(MDC.get(SHARD_ID_PROP))) {
|
||||
sb.append(" S:").append(MDC.get(SHARD_ID_PROP));
|
||||
sb.append(" s:").append(MDC.get(SHARD_ID_PROP));
|
||||
}
|
||||
if (!StringUtils.isEmpty(MDC.get(REPLICA_PROP))) {
|
||||
sb.append(" R:").append(MDC.get(REPLICA_PROP));
|
||||
sb.append(" r:").append(MDC.get(REPLICA_PROP));
|
||||
}
|
||||
if (!StringUtils.isEmpty(MDC.get(CORE_NAME_PROP))) {
|
||||
sb.append(" c:").append(MDC.get(CORE_NAME_PROP));
|
||||
sb.append(" x:").append(MDC.get(CORE_NAME_PROP));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue