There is an maven OSGI component in which I have a call to EclipseStarter.stop()
statement which shuts down the OSGI framework. There are a couple of log statements printed after this line. I have used pax-logging with log4j2 as the logging backend and JCL at the frontend.
Since OSGI framework is down the log messages do not print through pax-logging-log4j2. Therefore I am trying to use java util logging to print these messages. The logger initialization in the java file is done as follows.
private static final Log log = LogFactory.getLog(MyClass.class);
private static final Logger logger = Logger.getLogger(MyClass.class.getName());
log.info("Before shutdown");
EclipseStarter.stop();
logger.log(Level.INFO, "After shutdown JUL");
log.info("After shutdown JCL");
The util logging statement seems to be skipping when I debugged.