[slf4j-user] Does slf4j have a conflict with Spring Boot or Java Process Runtime, because it stops logging after a while

Navin Ipe navin.ipe at searchlighthealth.com
Mon Jun 27 05:02:54 UTC 2016


Hi,

I'm using...






*import org.slf4j.Logger;import org.slf4j.LoggerFactory;static Logger
logger = LoggerFactory.getLogger(MyClass.class);Process ps;ps =
Runtime.getRuntime().exec("java -jar myclass.jar");ps.waitFor();*

MyClass is part of a Spring Boot project which uses these dependencies:



*dependencies {  compile "ch.qos.logback:logback-classic:1.1.3"  compile
"ch.qos.logback:logback-core:1.1.3"  compile "org.slf4j:slf4j-api:1.7.12"*

*Problem is...*
myclass.jar runs fine for a while and I can see the outputs of the logger
in myclass.log, but after a few hundred lines, there are no more log
outputs visible. Moreover, the program itself doesn't seem to function
anymore (the program is supposed to be writing to MySQL) but the program
does not quit either. It just appears to hang. I left it for 14 hours like
that, and nothing proceeded. There's no while loop after ps.waitFor(), and
the code is itself not in an infinite loop. As long as the logs are written
to the file, the program also writes to MySQL.

On the other hand, if I switch off logging, the program works fine from
start to end, writes to MySQL and completes running in 6 hours and exits
fine.

I'm considering writing a small sample program to test it out separately,
but considered asking here in case this is a known issue.


-- 
Regards,
Navin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/slf4j-user/attachments/20160627/ad164017/attachment.html>


More information about the slf4j-user mailing list