[jboss-jira] [JBoss JIRA] Commented: (JBLOGGING-60) Logger#getMessageLogger() should allow category to be specified as class
David Lloyd (JIRA)
jira-events at lists.jboss.org
Mon Aug 1 10:12:23 EDT 2011
[ https://issues.jboss.org/browse/JBLOGGING-60?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12617856#comment-12617856 ]
David Lloyd commented on JBLOGGING-60:
--------------------------------------
I'm deliberately trying to discourage the practice of using a class name as a log category - especially in the message logger case which is intended for displaying error messages which are meant to be logged even when debug logging is not enabled. The category should be a string which represents the logical process associated with the log message. Class names are internal implementation details that really do not need to be exposed by default. If the user really wants to know the class name, they can add it to the format string.
> Logger#getMessageLogger() should allow category to be specified as class
> ------------------------------------------------------------------------
>
> Key: JBLOGGING-60
> URL: https://issues.jboss.org/browse/JBLOGGING-60
> Project: JBoss Logging
> Issue Type: Enhancement
> Security Level: Public(Everyone can see)
> Affects Versions: 3.0.0.Beta4-jboss-logging
> Reporter: Dan Allen
> Assignee: David Lloyd
>
> To be consistent with the getLogger() method on Logger:
> static Logger getLogger(String category)
> static Logger getLogger(Class<?> category)
> the getMessageLogger() should allow the category to be specified as a class by adding these additional methods
> static <T> T getMessageLogger(Class<T> type, Class<?> category)
> static <T> T getMessageLogger(Class<T> type, Class<?> category, Locale locale)
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list