Hi Ceki, <br>I (again) have some questions about log4j.<br>(I guess Logback works the same way....)<br>I was wondering if there's a way to save a "logger object" to a <br>data structure like a queue or something before sending it to some appender.<br>
For example:<br>The socket appender will cause the log4j client to lock/freeze if there's no link to the server.<br>I verified it and it does lock the client. <br>I need to deal with this issue so I'd like to store "logger objects" (or something) <br>
before they go to the socket or some other appender first.<br>At the moment I have a wrapper around the log4j that when the debug method is called<br>I'm just calling the log4j debug method passing some args etc.<br>so I have: logger.debug("some stuff");<br>
The configuration file does the trick and outputs to the console (at the moment) all the info:<br>the class name, the method name, the line number etc. <br>I'd like to save this info somehow to some object that I can store in a queue or something. <br>
How do I retrieve this information programmatically? Is there a way?<br>I know about LoggingEvent object, could I use it and pass the above stated information<br>to its constructor then store it in a queue? <br>Logger gets me for free (like method name etc.)<br>
Any suggestion?<br>Thanks a lot.<br>Greg. <br><br><br>