
Hello Gilles, If as Nikolas suspects, swing uses java.util.logging which it probably does, then go with his suggestion of redirecting j.u.l. to SLF4J. If for some reason swing actually writes directly to the console, then you would want to capture system.out and direct it to SLF4J. Robert Elliot started working on this very tricky topic and made some real progress, see [1]; but for some unfortunate reason the issue got stalled. HTH [1] http://bugzilla.slf4j.org/show_bug.cgi?id=110 On 23/02/2010 12:51 PM, Nikolas Everett wrote:
You'd have to catch all the different loggers and funnel them into slf4j. I assume swing uses java.util.logging so you'd want the JUL to SLF4J section of http://www.slf4j.org/legacy.html . In all of my projects I typically include the other bridges (JCL and Log4J) as a matter of course but I normally don't have to deal with JUL.
On Tue, Feb 23, 2010 at 6:02 AM, Gilles Gaillard <gillouxgaillard@wanadoo.fr <mailto:gillouxgaillard@wanadoo.fr>> wrote:
Hi,
I'm new to logback and would like to know if the following already exist / is possible, i searched the mailing list but did not find this.
I've a GUI application performing usual logging through logback (that's ok) and would ensure that any unexpected failure(s) be logged. For example, unexpected errors occuring on the swing EDT go the std err. Usually I would do this by redirecting the standard out/err streams to some file output. Note also that I would like to ensure that logs from different threads will log properly. For example, stack traces should not be mangled by other logs.
I wonder it is possible to do this through the logback configuration. If not what would be the best way.
Thanks, -- Gilles