to make this work I did the following:
private void writeToAuditLog(Object message,Status status){ logger.info("{} {}",status.getName(),message); try { try{ AuditorFactory.setApplicationName(getClass().getSimpleName()); }catch(AuditException e){ //ignore } AuditorFactory.configureByResource(AuditorFactory.getAuditor(), Loader.getResource("logback-audit.xml", getClass().getClassLoader())); new AuditorFacade(message.getClass().getSimpleName(), status.getName(), message.toString()).audit(); } catch (AuditException e) { logger.error("",e); } }
to make this work I did the following: