/** * Configure logging reading from any log4j2.properties found in the config directory and its * subdirectories from the specified environment. Will also configure logging to point the logs * directory from the specified environment. * * @param environment the environment for reading configs and the logs path * @throws IOException if there is an issue readings any log4j2.properties in the config * directory * @throws UserException if there are no log4j2.properties in the specified configs path */ public static void configure(final Environment environment) throws IOException, UserException { Objects.requireNonNull(environment); try { // we are about to configure logging, check that the status logger did not log any error-level messages checkErrorListener(); } finally { // whether or not the error listener check failed we can remove the listener now StatusLogger.getLogger().removeListener(ERROR_LISTENER); } configure(environment.settings(), environment.configFile(), environment.logsFile()); }
LogConfigurator.configure(environment); } catch (IOException e) { throw new BootstrapException(e);
/** * Configure logging reading from any log4j2.properties found in the config directory and its * subdirectories from the specified environment. Will also configure logging to point the logs * directory from the specified environment. * * @param environment the environment for reading configs and the logs path * @throws IOException if there is an issue readings any log4j2.properties in the config * directory * @throws UserException if there are no log4j2.properties in the specified configs path */ public static void configure(final Environment environment) throws IOException, UserException { Objects.requireNonNull(environment); try { // we are about to configure logging, check that the status logger did not log any error-level messages checkErrorListener(); } finally { // whether or not the error listener check failed we can remove the listener now StatusLogger.getLogger().removeListener(ERROR_LISTENER); } configure(environment.settings(), environment.configFile(), environment.logsFile()); }
/** * Configure logging reading from any log4j2.properties found in the config directory and its * subdirectories from the specified environment. Will also configure logging to point the logs * directory from the specified environment. * * @param environment the environment for reading configs and the logs path * @throws IOException if there is an issue readings any log4j2.properties in the config * directory * @throws UserException if there are no log4j2.properties in the specified configs path */ public static void configure(final Environment environment) throws IOException, UserException { Objects.requireNonNull(environment); try { // we are about to configure logging, check that the status logger did not log any error-level messages checkErrorListener(); } finally { // whether or not the error listener check failed we can remove the listener now StatusLogger.getLogger().removeListener(ERROR_LISTENER); } configure(environment.settings(), environment.configFile(), environment.logsFile()); }
if (!disableESLogger) { LogConfigurator.registerErrorListener(); LogConfigurator.configure(environment);
configure(environment.settings(), environment.configFile(), environment.logsFile());
final Environment environment = createEnvironment(foreground, pidFile, keystore, initialEnv.settings(), initialEnv.configFile()); try { LogConfigurator.configure(environment); } catch (IOException e) { throw new BootstrapException(e);
LogConfigurator.configure(environment); } catch (IOException e) { throw new BootstrapException(e);
Environment environment = createEnvironment(foreground, pidFile, keystore, initialEnv.settings()); try { LogConfigurator.configure(environment); } catch (IOException e) { throw new BootstrapException(e);