|
From: Fabian G. <fab...@mu...> - 2017-02-15 15:58:08
|
Hello, This is my first mail so greetings to all. I'm a having the following issue. The log level is set to WARN in wrapper.conf both for the console and the log file. Before starting the wrapper through WrapperManager.start, I should perform a verification. In case this verification fails, I have to start the java side of the wrapper only to log to wrapper log file as well as the console. So, what I do is perform WrapperManager.start WrapperManager.log and the WrapperManger.stop. The issue I'm having is that I have no way to verify that the socket connection to the wrapper backend is actually opened, so if I perform: WrapperManager.start WrapperManager.log WrapperManager.stop the log command is not sent to the backend before stopping the java side of the application. If I use something like this: WrapperManager.start Thread.sleep(10000) WrapperManager.log WrapperManager.stop I manage to get the the message logged, but I am being confident that the sleep time is the appropriate (kind of a hack). From: https://sourceforge.net/p/wrapper/mailman/message/30555007/ that for levels above INFO, that's the only way I have to log one of my messages to the logfile and the console as it is managed by the backend. Is there any other way apart from the sleep to make sure that the message is logged before sending the WrapperManager.stop. Thanks in advance! |