Norconex / jef

Job Execution Framework.
Apache License 2.0
4 stars 5 forks source link

removeAppender in JobSuite Exception #13

Open kemcon opened 4 years ago

kemcon commented 4 years ago

Hi,

i use your last RELEASE with collectorConfig.setLogsUnmanaged(true);

then i use the log4j-over-slf4j bridge, to manage the logging. and this bridge crashed in line 314 of JobSuite, because there is no removeAppender method: 314: Logger.getRootLogger().removeAppender(appender);

But, there is also no appender (=null), because of the new collectorConfig.setLogsUnmanaged(true); config. so please put a bugfix in your code, and move this line of code into to if (appender != null) one line above.

essiembre commented 4 years ago

I was able to reproduce. Working on a fix.

essiembre commented 4 years ago

I applied the fix you suggested plus added more conditional checks that should make life easier for SLF4J users. Can you please replace the norconex-commons-lang-*.jar and norconex-jef-*.jar files you have with the following snapshots (or update your pom.xml accordingly if you use Maven):

norconex-commons-lang-1.15.2-SNAPSHOT

norconex-jef-4.1.3-SNAPSHOT

Let me know if that resolves your problem.