Skip to content

Commit

Permalink
avoid null notification propagation from SPU
Browse files Browse the repository at this point in the history
  • Loading branch information
lroffia committed Jun 16, 2021
1 parent e630c32 commit dfc3df5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,10 @@ public void run() {
logger.log(Level.getLevel("spu"), "* POST PROCESSING *");
try {
Notification notify = postUpdateInternalProcessing((UpdateResponse) response);
logger.log(Level.getLevel("spu"), "notifyEvent");
manager.notifyEvent(notify);
if (notify != null) {
logger.log(Level.getLevel("spu"), "notifyEvent");
manager.notifyEvent(notify);
}
} catch (SEPAProcessingException e) {
SPUManagerBeans.postProcessingException();
logger.error(e.getMessage());
Expand Down
20 changes: 7 additions & 13 deletions engine/src/main/resources/log4j2.xml
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<Configuration>
<CustomLevels>
<!-- Standard Level intLevel
OFF 0
FATAL 100
ERROR 200
WARN 300
INFO 400
DEBUG 500
TRACE 600
ALL Integer.MAX_VALUE -->
<!-- Standard Level intLevel OFF 0 FATAL 100 ERROR 200 WARN 300 INFO 400
DEBUG 500 TRACE 600 ALL Integer.MAX_VALUE -->
<CustomLevel name="SPUManager" intLevel="700" />
<CustomLevel name="spu" intLevel="700" />
<CustomLevel name="timing" intLevel="700" />
Expand All @@ -23,14 +16,15 @@
<PatternLayout
pattern="%d{ISO8601} [%-5level] %t (%F:%L) %msg%n%throwable" />
</Console>
<File name="Log" fileName="sepa.engine.csv">
<PatternLayout pattern="%d{ISO8601}|[%-5level]|%t|(%F:%L)|%msg%n%throwable\n"/>
<File name="Log" fileName="logs/${sys:logFilename}.csv">
<PatternLayout
pattern="%d{ISO8601}|[%-5level]|%t|(%F:%L)|%msg%n%throwable\n" />
</File>
</Appenders>
<Loggers>
<Root level="error">
<Root level="debug">
<AppenderRef ref="Console" level="trace" />
<AppenderRef ref="Log" level="error"/>
<AppenderRef ref="Log" level="debug" />
</Root>
</Loggers>
</Configuration>

0 comments on commit dfc3df5

Please sign in to comment.