You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Lukasz Lenart (JIRA)" <ji...@apache.org> on 2014/08/07 08:51:12 UTC
[jira] [Commented] (WW-4344) Improve Logging layer implementation
to avoid additional boilerplate with if (LOG.isDebugEnable)
[ https://issues.apache.org/jira/browse/WW-4344?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14088918#comment-14088918 ]
Lukasz Lenart commented on WW-4344:
-----------------------------------
The following discussion
http://markmail.org/message/idhk573wrhuxzkbm
postponing as it isn't clear now
> Improve Logging layer implementation to avoid additional boilerplate with if (LOG.isDebugEnable)
> ------------------------------------------------------------------------------------------------
>
> Key: WW-4344
> URL: https://issues.apache.org/jira/browse/WW-4344
> Project: Struts 2
> Issue Type: Improvement
> Components: "New" API
> Affects Versions: 2.3.16.3
> Reporter: Lukasz Lenart
> Assignee: Lukasz Lenart
> Labels: logging
> Fix For: 2.5
>
>
> Instead using
> {code:java}
> if (LOG.isDebugEnable()) {
> LOG.debug("Action name is [#0]', actionName);
> }
> {code}
> can be reduced to
> {code:java}
> LOG.debug("Action name is [#0]', actionName);
> {code}
> with implementation in {{JdkLogger}} and any other implementation of {{Logger}} interface:
> {code:java}
> public void debug(String message, String... params) {
> if(isDebugEnable()) {
> // perform logging
> }
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.2#6252)