Java Code Examples for org.slf4j.bridge.SLF4JBridgeHandler#uninstall()
The following examples show how to use
org.slf4j.bridge.SLF4JBridgeHandler#uninstall() .
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: LOGBackConfigurer.java From styx with Apache License 2.0 | 5 votes |
/** * Shut down LOGBack. * This isn't strictly necessary, but recommended for shutting down * logback in a scenario where the host VM stays alive (for example, when * shutting down an application in a J2EE environment). * * @param uninstallJULBridge should an attempt be made to uninstall the JUL bridge */ public static void shutdownLogging(boolean uninstallJULBridge) { ContextSelector selector = ContextSelectorStaticBinder.getSingleton().getContextSelector(); LoggerContext loggerContext = selector.getLoggerContext(); String loggerContextName = loggerContext.getName(); LoggerContext context = selector.detachLoggerContext(loggerContextName); if (uninstallJULBridge) { SLF4JBridgeHandler.uninstall(); } context.stop(); }
Example 2
Source File: LoggingConfiguratorTest.java From selenium-grid-extensions with Apache License 2.0 | 5 votes |
@After public void tearDown() throws Exception { // restore Logger.getRootLogger().removeAllAppenders(); for (Appender appender : appenders) { Logger.getRootLogger().addAppender(appender); } SLF4JBridgeHandler.uninstall(); }
Example 3
Source File: SLF4JBridgeHandlerBundleActivator.java From jitsi-videobridge-openfire-plugin with Apache License 2.0 | 4 votes |
@Override public void stop( BundleContext context ) throws Exception { SLF4JBridgeHandler.uninstall(); }
Example 4
Source File: AbstractZetMojo.java From carnotzet with Apache License 2.0 | 4 votes |
@Override public void execute() throws MojoFailureException, MojoExecutionException { SLF4JBridgeHandler.install(); List<CarnotzetExtension> runtimeExtensions = findRuntimeExtensions(); CarnotzetModuleCoordinates coordinates = new CarnotzetModuleCoordinates(project.getGroupId(), project.getArtifactId(), project.getVersion()); if (instanceId == null) { instanceId = Carnotzet.getModuleName(coordinates, Pattern.compile(CarnotzetConfig.DEFAULT_MODULE_FILTER_PATTERN), Pattern.compile(CarnotzetConfig.DEFAULT_CLASSIFIER_INCLUDE_PATTERN)); } Path resourcesPath = Paths.get(project.getBuild().getDirectory(), "carnotzet"); if (SystemUtils.IS_OS_WINDOWS) { // we avoid using ${project.build.directory} because "mvn clean" when the sandbox is running would try to delete mounted files, // which is not supported on Windows. resourcesPath = Paths.get("/var/tmp/carnotzet_" + instanceId); } CarnotzetConfig config = CarnotzetConfig.builder() .topLevelModuleId(coordinates) .resourcesPath(resourcesPath) .topLevelModuleResourcesPath(project.getBasedir().toPath().resolve("src/main/resources")) .failOnDependencyCycle(failOnDependencyCycle) .attachToCarnotzetNetwork(attachToCarnotzetNetwork) .supportLegacyDnsNames(supportLegacyDnsNames) .extensions(runtimeExtensions) .build(); carnotzet = new Carnotzet(config); if (bindLocalPorts == null) { bindLocalPorts = !SystemUtils.IS_OS_LINUX; } runtime = new DockerComposeRuntime(carnotzet, instanceId, DefaultCommandRunner.INSTANCE, bindLocalPorts); executeInternal(); SLF4JBridgeHandler.uninstall(); }
Example 5
Source File: LogConfigurator.java From google-cloud-eclipse with Apache License 2.0 | 4 votes |
@Override public void stop(BundleContext context) throws Exception { SLF4JBridgeHandler.uninstall(); }
Example 6
Source File: AutodetectLogManager.java From seed with Mozilla Public License 2.0 | 4 votes |
@Override public void close() { SLF4JBridgeHandler.uninstall(); logManager.close(); }
Example 7
Source File: JerseyUseSlf4jPlease.java From json-schema-validator-demo with GNU Lesser General Public License v3.0 | 4 votes |
@Override public void contextDestroyed(final ServletContextEvent sce) { SLF4JBridgeHandler.uninstall(); }
Example 8
Source File: JulHandler.java From lemon with Apache License 2.0 | 4 votes |
public void destroy() { SLF4JBridgeHandler.uninstall(); }