}
@Override
public void reconnectAppender() {
ILoggerFactory loggerFactory = LoggerFactory.getILoggerFactory();
AppenderAttachable appenderAttachable = null;
if (loggerFactory instanceof AppenderAttachable) {
appenderAttachable = (AppenderAttachable) loggerFactory;
}
if (appenderAttachable == null) {
appenderAttachable = LogManager.getRootLogger();
}
if (appenderAttachable != null) {
appender.setName("LogQuery");
appenderAttachable.addAppender(appender);
} else {
LOG.error("No ILoggerFactory found so cannot attach appender!");
}
}