org.springframework.boot.context.logging.LoggingApplicationListener Java Examples
The following examples show how to use
org.springframework.boot.context.logging.LoggingApplicationListener.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: LogbackListener.java From mPaaS with Apache License 2.0 | 5 votes |
@Override public void environmentPrepared(ConfigurableEnvironment environment) { if (executed.compareAndSet(false, true)) { String logConfig = environment.getProperty(LoggingApplicationListener.CONFIG_PROPERTY); if (StringUtils.isEmpty(logConfig)) { URL url = LogbackListener.class.getResource(LOGBACK_CFG_NAME); String filePath = url.getPath(); if (filePath.indexOf(ResourceUtils.JAR_FILE_EXTENSION) > -1) { filePath = ResourceUtils.JAR_URL_PREFIX + filePath; } System.setProperty(LoggingApplicationListener.CONFIG_PROPERTY, filePath); } } }
Example #2
Source File: LogbackListener.java From mPass with Apache License 2.0 | 5 votes |
@Override public void environmentPrepared(ConfigurableEnvironment environment) { if (executed.compareAndSet(false, true)) { String logConfig = environment.getProperty(LoggingApplicationListener.CONFIG_PROPERTY); if (StringUtils.isEmpty(logConfig)) { URL url = LogbackListener.class.getResource(LOGBACK_CFG_NAME); String filePath = url.getPath(); if (filePath.indexOf(ResourceUtils.JAR_FILE_EXTENSION) > -1) { filePath = ResourceUtils.JAR_URL_PREFIX + filePath; } System.setProperty(LoggingApplicationListener.CONFIG_PROPERTY, filePath); } } }
Example #3
Source File: GeodeLoggingApplicationListener.java From spring-boot-data-geode with Apache License 2.0 | 5 votes |
@Override public int getOrder() { return LoggingApplicationListener.DEFAULT_ORDER > Ordered.HIGHEST_PRECEDENCE ? LoggingApplicationListener.DEFAULT_ORDER - 1 : Ordered.HIGHEST_PRECEDENCE; }
Example #4
Source File: BootstrapApplicationListener.java From spring-cloud-commons with Apache License 2.0 | 5 votes |
private Collection<? extends ApplicationListener<?>> filterListeners( Set<ApplicationListener<?>> listeners) { Set<ApplicationListener<?>> result = new LinkedHashSet<>(); for (ApplicationListener<?> listener : listeners) { if (!(listener instanceof LoggingApplicationListener) && !(listener instanceof LoggingSystemShutdownListener)) { result.add(listener); } } return result; }
Example #5
Source File: LoggingFileOverrideListener.java From airsonic-advanced with GNU General Public License v3.0 | 4 votes |
@Override public int getOrder() { return LoggingApplicationListener.DEFAULT_ORDER - 1; }
Example #6
Source File: LoggingFileOverrideListener.java From airsonic with GNU General Public License v3.0 | 4 votes |
@Override public int getOrder() { return LoggingApplicationListener.DEFAULT_ORDER - 1; }
Example #7
Source File: GeodeLoggingApplicationListenerUnitTests.java From spring-boot-data-geode with Apache License 2.0 | 4 votes |
@Test public void getOrderReturnsHigherPrecedenceThanSpringBootLoggingApplicationListenerOrderByDefault() { assertThat(this.listener.getOrder()).isLessThan(new LoggingApplicationListener().getOrder()); }