in src/main/java/com/spotify/logging/LoggingConfigurator.java [529:560]
public static void configure(final File file, final String defaultIdent) {
final Logger rootLogger = (Logger) LoggerFactory.getLogger(Logger.ROOT_LOGGER_NAME);
// Setup context
final LoggerContext context = rootLogger.getLoggerContext();
context.reset();
// Log uncaught exceptions
UncaughtExceptionLogger.setDefaultUncaughtExceptionHandler();
// Load logging configuration from file
try {
final JoranConfigurator configurator = new JoranConfigurator();
configurator.setContext(context);
configurator.doConfigure(file);
} catch (JoranException je) {
// StatusPrinter will handle this
}
context.putProperty("pid", getMyPid());
final String hostname = getSpotifyHostname();
if (hostname != null) {
context.putProperty("hostname", hostname);
}
final String ident = context.getProperty("ident");
if (ident == null) {
context.putProperty("ident", defaultIdent);
}
StatusPrinter.printInCaseOfErrorsOrWarnings(context);
}