Allow to configure a common logger prefix using es.logger.prefix system prop, closes #360.

This commit is contained in:
kimchy 2010-09-08 12:16:41 +03:00
parent e151b83372
commit a768016779

View file

@ -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;
}
}