[ https://issues.apache.org/jira/browse/JDKIM-2?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13539738#comment-13539738 ]
Stefano Bagnara commented on JDKIM-2: ------------------------------------- About logging frameworks I still think the same things I wrote in the one year old thread Eric linked in his comment. "slf4j instead of commons-logging since the later creates issues with class-loaders in general and OSGi in particular.": IMHO this is a myth nowadays, anyway I mostly used commons-logging by injecting the logger instances in the classes so the classloader didn't apply at all. That said, jDKIM is a very slim library and using it I found it is stable and I never needed logging at all. Since opening this issue I guess I removed the System.out calls and improved some exceptions. Unless some user ask for some specific thing to be logged I think we should simply close this issue as won't fix. I found myself using the Observer pattern almost everywhere instead of a logging framework when writing libraries. This way you don't introduce a new dependency and you give much more power to the library users. I said "Observer pattern" but in fact I use something simpler, without the need to keep a listener registry. Simply create an eventlistener interface including meaningful methods for your domain and then let your classes "receive" implementations for this listener in their constructor or exposing a setter, then invoke it with if (listener != null) listener.itJustHappened(). > Add logging with commons logging > -------------------------------- > > Key: JDKIM-2 > URL: https://issues.apache.org/jira/browse/JDKIM-2 > Project: James jDKIM > Issue Type: Improvement > Components: library > Affects Versions: 0.2 > Reporter: Stefano Bagnara > Assignee: Stefano Bagnara > Fix For: 1.0 > > > Currently there are some System.out and exception based logging. Maybe real > logging is better at least for some component. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org