JDK14Appender for logback: Anybody written one?

Hi. I have a situation where I have a Java EE 6 web profile application which currently means that it needs to run in Glassfish 3.0.1. The appropriate way to log under Glassfish 3.0.1 is using java.util.logging which works well with slfj4-jdk14-whatever but where the _configuration_ of the logging system inside Glassfish sucks in new and exciting ways, which I have decided not to use. Hence I have figured out that what would work fine for us would be to embed logback in our application, use our usual logback configuration files which filter out those things we dont need anyway, and then let logback just end up dumping the log statements actually to be logged to java.util.logging. In other words, I need a JDK14Appender for logback. Has anyone written such a beast? It is not part of the standard logback distribution L Thanks /Thorbjørn

Thorbjørn Ravn Andersen-4 wrote:
In other words, I need a JDK14Appender for logback.
This is not necessary. You can define an ConsoleAppender. Everything that points to Console is automatically directed in Glassfish to java.util.logging and server.log. Just add ConsoleAppender and you should accomplish your objective. -- View this message in context: http://old.nabble.com/JDK14Appender-for-logback%3A--Anybody-written-one--tp3... Sent from the Logback User mailing list archive at Nabble.com.

I missed this response, sorry. The problem with this is that I would like to keep the original log message level and other meta-data, essentially using logback as a _filtering engine_ instead of having it generate final log strings. The ConsoleAppender approach logs everything at INFO level, even If the original message was DEBUG level, loosing context for the Glassfish log tooling. So, the JDK14Appender is still warranted and useful. /Thorbjørn From: logback-user-bounces@qos.ch [mailto:logback-user-bounces@qos.ch] On Behalf Of cinhtau Sent: 9. februar 2011 17:23 To: logback-user@qos.ch Subject: Re: [logback-user] JDK14Appender for logback: Anybody written one? Thorbjørn Ravn Andersen-4 wrote: In other words, I need a JDK14Appender for logback. This is not necessary. You can define an ConsoleAppender. Everything that points to Console is automatically directed in Glassfish to java.util.logging and server.log. Just add ConsoleAppender and you should accomplish your objective. _____ View this message in context: Re: JDK14Appender for logback: Anybody written one? <http://old.nabble.com/JDK14Appender-for-logback%3A--Anybody-written-one--tp30017964p30884388.html> Sent from the Logback User mailing list archive <http://old.nabble.com/Logback-User-f16252.html> at Nabble.com.
participants (2)
-
cinhtau
-
Thorbjørn Ravn Andersen