struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lukasz Lenart <lukaszlen...@apache.org>
Subject Less boilerplate in code
Date Sat, 10 May 2014 07:43:05 GMT
Hi,

What do you think about that idea [1]?

Basically instead of doing this:

if (LOG.isDebugEnable()) {
     LOG.debug("Action name is [#0]', actionName);
}

it will be possible to do this:

LOG.debug("Action name is [#0]', actionName);

with implementation in eg. JdkLogger like this:

public void debug(String message, String... params) {
    if(isDebugEnable()) {
         // perform logging
    }
}

wiht assumption that we always use version with params and don't use
string concatenation

[1] https://issues.apache.org/jira/browse/WW-4344


Regards
-- 
Ɓukasz
+ 48 606 323 122 http://www.lenart.org.pl/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Mime
View raw message