use of org.sonar.process.logging.RootLoggerConfig in project sonarqube by SonarSource.
the class EsLogging method createProperties.
public Properties createProperties(Props props, File logDir) {
Log4JPropertiesBuilder log4JPropertiesBuilder = new Log4JPropertiesBuilder(props);
RootLoggerConfig config = newRootLoggerConfigBuilder().setNodeNameField(getNodeNameWhenCluster(props)).setProcessId(ProcessId.ELASTICSEARCH).build();
String logPattern = log4JPropertiesBuilder.buildLogPattern(config);
return log4JPropertiesBuilder.internalLogLevel(Level.ERROR).rootLoggerConfig(config).logPattern(logPattern).enableAllLogsToConsole(isAllLogsToConsoleEnabled(props)).jsonOutput(isJsonOutput(props)).logDir(logDir).logLevelConfig(LogLevelConfig.newBuilder(log4JPropertiesBuilder.getRootLoggerName()).rootLevelFor(ProcessId.ELASTICSEARCH).immutableLevel("DEPRECATION", Level.ERROR).immutableLevel("org.elasticsearch.deprecation", Level.ERROR).immutableLevel("org.elasticsearch.client.RestClient", Level.ERROR).build()).build();
}
Aggregations