[logback-user] Custom Logger for logging custom object?
Adam Brightwell
abrightwell at LCE.com
Sat Jul 7 03:15:50 CEST 2012
Hey All,
I have an interesting logging requirement in front of me. I am required to log application specific information that is contained within a custom POJO. The developers will create and fill these POJO's with the appropriate information when a logging "event" takes place. The hope was that it could then be passed off to our logging system and it would know what to do with it. However, the obvious problem is that Logger can't be overridden to allow the overloading of the info, warn, error, etc. methods to receive the custom POJO. I have considered simply implementing the "Delegation Pattern" implementing the slf4j Logger interface and wrapping the logback Logger which would allow me to simply overload the necessary methods. I was curious what the communities thoughts might be on this potential solution. Are there other recommendations that might work better for my purposes? Any help, recommendations or guidance would be greatly appreciated.
Thanks,
Adam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/logback-user/attachments/20120707/2f2d7556/attachment.html>
More information about the Logback-user
mailing list