static void addStatusListener(LoggerContext loggerContext,
String listenerClass) {
StatusListener listener = null;
if (ContextInitializer.SYSOUT.equalsIgnoreCase(listenerClass)) {
listener = new OnConsoleStatusListener();
} else {
try {
listener = (StatusListener) OptionHelper.instantiateByClassName(
listenerClass, StatusListener.class, loggerContext);
if(listener instanceof ContextAware) // LOGBACK-767