[ https://issues.apache.org/jira/browse/LOG4J2-86?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13457952#comment-13457952 ]
Ivan Anev commented on LOG4J2-86: --------------------------------- To be honest I've missed those methods. logger.catching(Throwable) would seem what we really need. In Flow Tracing it is said it will be logged with level of ERROR, but it is actually logged with level of DEBUG. In general it's not a big deal. To write logger.catching(Level.ERROR, e) would be less ideal than logger.error(e), but if you think this is less former API breaking, I'm good. Still when catching an exception ERROR seems more appropriate default level. At the end of the day I was just suggesting. > Provide a logging methods with only a Throwable object as parameters > -------------------------------------------------------------------- > > Key: LOG4J2-86 > URL: https://issues.apache.org/jira/browse/LOG4J2-86 > Project: Log4j 2 > Issue Type: New Feature > Components: API > Reporter: Ivan Anev > Fix For: 2.0-beta1 > > > Provide logging methods with only a Throwable object as a single parameter: > info(Throwable e) > error(Throwable e) > ... > The throwable objects contain a message themself and a stacktrace. So most of > the times its pointless to log additional message. So in order to log them > now you have to log an empty message and the throwable object: > logger.error("", e); > Which is obviously ugly and pointless when there is no reason not to have > method like: > logger.error(e); > that should log both the message and the stacktrace. -- 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: log4j-dev-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-dev-h...@logging.apache.org