logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ralph Goers (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (LOG4J2-1241) Have a method that checks if logger debug is enabled and then does the logging
Date Sat, 02 Jan 2016 13:51:39 GMT

    [ https://issues.apache.org/jira/browse/LOG4J2-1241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15076522#comment-15076522
] 

Ralph Goers edited comment on LOG4J2-1241 at 1/2/16 1:51 PM:
-------------------------------------------------------------

logger.error, etc. already do this. Please see the documentation on using placeholders in
the string to be logged.


was (Author: ralph.goers@dslextreme.com):
logger.error, etc. already do this.

> Have a method that checks if logger debug is enabled and then does the logging
> ------------------------------------------------------------------------------
>
>                 Key: LOG4J2-1241
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-1241
>             Project: Log4j 2
>          Issue Type: Wish
>          Components: Core
>            Reporter: Harinder Singh Bedi
>            Priority: Minor
>
> Sometimes we need to add an if condition to check if logging is enabled in debug mode
and then we add a log.debug method call. It would be great if we can have a method that has
this condition inside it.
> Like log.debugIfEnbaled("Thanks");



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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


Mime
View raw message