[logback-user] log4j/logback/JCL/SLF4J???

David Vergnaud dvergnaud at yahoo.com
Tue Oct 6 18:06:35 CEST 2009

Hi Ceki,

thanks of a lot for your answer. 

> You could create your own layout (see section "Writing your own layout
> in [1]) which could output logging events in XML format. The
> getContentType(), getFileHeader(), getFileFooter() methods in your
> Layout will be invoked when the log file is opened or closed, so as to
> produce valid XML .

I had tried to do just that with log4j, and only half of it had worked -- as i said, I think there was a problem with the writeFooter method. I take it this problem doesn't occur in logback. 

> Both log4j and logback have the capability you are asking for. See the
> chapter on filters http://logback.qos.ch/manual/filters.html

I hadn't had time to look into filters yet, I'll be sure to check them out! :-)

> Before extending logback, I suggest that you spend some time reading the manual.
Yup, that's definitely what I want to do. My question was more about which of the newer alternatives might be better for me, but it looks like logback will definitely be appropriate, so I'll start with that. 

again thx a lot! 


Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

More information about the Logback-user mailing list