[
https://issues.apache.org/jira/browse/JSPWIKI-376?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12652446#action_12652446
]
Ceki Gulcu commented on JSPWIKI-376:
------------------------------------
SLF4J already has support for parameterized logging [1, 2]. So
com.ecyrd.jspwik.log.LoggerImpl duplicates an existing functionality but using
a different convention. Message formatting in java.lang.String is more flexible
but also much slower than SLF4J's implementation. So you will be roughly
doubling the cost of an enabled log statement. Going through an indirection
(LoggerImpl) will also roughly double the cost of a disabled log statement.
As for serialization, well, com.ecyrd.jspwik.log.LoggerImpl is not
serializable. So, if you have objects placed in an HttpSesison which refer to
loggers as instance variables, then Tomcat will have trouble with clustering.
As for logger selectors, all wrappers ruin context selector functionality.
Admittedly, the slf4j-log4j binding, since it is not native, already breaks
repository selectors (aka context selectors). However, if logback were used as
the underlying implementation, context selectors work as they should. They
won't with jspwik.log.LoggerImpl.
If you have further questions, please post them on the [EMAIL PROTECTED]
mailing list.
HTH,
[1] http://www.slf4j.org/manual.html
[2] http://www.slf4j.org/faq.html#logging_performance
> Move from log4j to slf4j
> ------------------------
>
> Key: JSPWIKI-376
> URL: https://issues.apache.org/jira/browse/JSPWIKI-376
> Project: JSPWiki
> Issue Type: Improvement
> Components: Core & storage
> Reporter: Janne Jalkanen
> Assignee: Harry Metske
> Priority: Minor
> Fix For: 3.0
>
> Attachments: jspwiki-log.odp
>
>
> SLF4J allows far more flexible logging than log4j, and it would allow us to
> get rid of these dumb log4j compatibility problems that sometimes occur. It
> also plays better with other applications, gives the user more power to
> choose how to log his stuff, and is also pretty cool otherwise. The change
> would be relatively trivial, and would probably be largely invisible to the
> users (since we could continue shipping with necessary log4j jars).
> http://www.slf4j.org
> The license is MIT/X11, so that's fine.
> Opinions?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.