-
-
Save cap5lut/7d88596eae97471584c38377cc6174a1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.github.cap5lut.service.test; | |
import org.apache.logging.log4j.LogManager; | |
import org.apache.logging.log4j.Logger; | |
import org.osgi.framework.BundleActivator; | |
import org.osgi.framework.BundleContext; | |
public class Activator implements BundleActivator { | |
private volatile Logger logger; | |
@Override | |
public void start(BundleContext context) throws Exception { | |
System.out.println("started"); | |
logger = LogManager.getLogger(); | |
logger.fatal("started"); | |
} | |
@Override | |
public void stop(BundleContext context) throws Exception { | |
logger.fatal("stopped"); | |
logger = null; | |
System.out.println("stopped"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment