Jerry Chin created LOG4J2-2326:
----------------------------------
Summary: Please consider to provide shortcuts for most common
methods of Logger.
Key: LOG4J2-2326
URL: https://issues.apache.org/jira/browse/LOG4J2-2326
Project: Log4j 2
Issue Type: Improvement
Components: API
Reporter: Jerry Chin
Hey guys,
I'm using Log4j a lot in my project, it even becomes a little bit too verboseĀ
to type {{error}} {{info}} etc... I wonder whether if it's radical to add some
shortcuts for these methods?
For example:
{{t = trace}}
{{d = debug}}
{{i = info}}
{{w = warn}}
{{e = error}}
{{f = fatal}}
{code:java}
public class Demo {
public void main(String[] args) {
L.d("args: {}", Arrays.toString(args));
int x = 1 + 2;
L.i("final result: {}", x);
if(x > 3) {
L.e("unexpected result: {}", x);
}
L.f("exit.");
}
}
{code}
for example's sake, {{debug, info, error and fatal}} are all employed in the
code snippet, in reality, though it's not very likely, so the confused look of
the these method should not be so scary.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)