From opensource21 at gmail.com Mon Jul 18 18:21:22 2016 From: opensource21 at gmail.com (niels) Date: Mon, 18 Jul 2016 20:21:22 +0200 Subject: [slf4j-user] Does slf4j have a conflict with Spring Boot or Java Process Runtime, because it stops logging after a while In-Reply-To: References: Message-ID: I would guess you use the consolelogger and after a while the buffer is full ps hangs.Without the information about the appender it's hard to analyse. Perhaps it would be better to call the java-program directly and not start a java-process to start a java-process. Niels 2016-06-27 7:02 GMT+02:00 Navin Ipe : > 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 > > _______________________________________________ > slf4j-user mailing list > slf4j-user at qos.ch > http://mailman.qos.ch/mailman/listinfo/slf4j-user > -------------- next part -------------- An HTML attachment was scrubbed... URL: