this.log = event.getLoggerName();
this.time = event.getTimeStamp();
this.level = event.getLevel().toString();
this.msg = event.getMessage().toString();
this.thread = event.getThreadName();
final ThrowableInformation throwableInformation = event.getThrowableInformation();
HashMap<String, Object> ex = new HashMap<String, Object>();
if (throwableInformation != null) {
if(throwableInformation.getThrowable().getClass().getCanonicalName() != null){
ex.put("exception_class",throwableInformation.getThrowable().getClass().getCanonicalName());
}
if(throwableInformation.getThrowable().getMessage() != null) {
ex.put("exception_message",throwableInformation.getThrowable().getMessage());
}
if( throwableInformation.getThrowableStrRep() != null) {
String stackTrace = StringUtils.join(throwableInformation.getThrowableStrRep(),"\n");
ex.put("stacktrace",stackTrace);
}
}
this.exceptionInformation = ex;
this.ndc = event.getNDC();