mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-04-24 23:27:25 -04:00
Allow to configure a common logger prefix using es.logger.prefix
system prop, closes #360.
This commit is contained in:
parent
e151b83372
commit
a768016779
1 changed files with 3 additions and 1 deletions
|
@ -40,6 +40,8 @@ import static org.elasticsearch.common.collect.Lists.*;
|
|||
*/
|
||||
public class Loggers {
|
||||
|
||||
private final static String commonPrefix = System.getProperty("es.logger.prefix", "");
|
||||
|
||||
public static final String SPACE = " ";
|
||||
|
||||
private static boolean consoleLoggingEnabled = true;
|
||||
|
@ -152,6 +154,6 @@ public class Loggers {
|
|||
if (name.startsWith("org.elasticsearch.")) {
|
||||
return name.substring("org.elasticsearch.".length());
|
||||
}
|
||||
return name;
|
||||
return commonPrefix + name;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue