Skip to content

Commit

Permalink
handle all Throwables in the same way, not only JDOMException
Browse files Browse the repository at this point in the history
  • Loading branch information
ar committed Jun 28, 2024
1 parent 160e740 commit faed8c6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public LogEventJsonLogRenderer() {
mapper.enable(SerializationFeature.INDENT_OUTPUT);
mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
SimpleModule module = new SimpleModule();
module.addSerializer(JDOMException.class, new ThrowableSerializer());
module.addSerializer(Throwable.class, new ThrowableSerializer());
mapper.registerModule(module);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import com.fasterxml.jackson.databind.module.SimpleModule;
import com.fasterxml.jackson.dataformat.xml.XmlMapper;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
import org.jdom2.JDOMException;
import org.jpos.log.AuditLogEvent;

import org.jpos.log.LogRenderer;
Expand All @@ -32,7 +31,7 @@ public LogEventXmlLogRenderer() {
mapper.enable(SerializationFeature.INDENT_OUTPUT);

SimpleModule module = new SimpleModule();
module.addSerializer(JDOMException.class, new ThrowableSerializer());
module.addSerializer(Throwable.class, new ThrowableSerializer());
mapper.registerModule(module);
}

Expand Down

0 comments on commit faed8c6

Please sign in to comment.