|
From: Maxime <ma...@ta...> - 2017-02-17 02:00:05
|
Hello Fabian Thank you for your email. What about using filters ? Filters work by searching for sequences of text in log outputs of the JVM. When the specified pattern is found, several actions can then be taken. For example you can stop the Wrapper or trigger a user event that can be transmitted back to your application. In your case, this is probably a good way to confirm that your message is logged. Please check our documentation to know more about filters: https://wrapper.tanukisoftware.com/doc/english/prop-filter-x-n.html I remain at your disposal should you have any questions. Best Regards, Maxime On Thu, Feb 16, 2017 at 12:35 AM, Fabian Gonzalez < fab...@mu...> wrote: > 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! > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, SlashDot.org! http://sdm.link/slashdot > _______________________________________________ > Wrapper-user mailing list > Wra...@li... > https://lists.sourceforge.net/lists/listinfo/wrapper-user > > |