code: 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);
    }
docs: Configure logging using a logback configuration file.
  
  @param file         A logback configuration file.
  @param defaultIdent Fallback logging identity, used if not specified in config file.