[logback-dev] [JIRA] Issue Comment Edited: (LBCLASSIC-102) Suggestion: Change logger name of inner classes.
Ceki Gulcu (JIRA)
noreply-jira at qos.ch
Mon Dec 14 11:29:33 CET 2009
[ http://jira.qos.ch/browse/LBCLASSIC-102?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=11441#action_11441 ]
Ceki Gulcu edited comment on LBCLASSIC-102 at 12/14/09 11:28 AM:
-----------------------------------------------------------------
The code assumes that '$' is always the last separator character and that no '.' can follow it. This is a reasonable assumption as long as the logger name strictly follows the name of the host class convention. You are using a different convention where the aforementioned assumption does not hold.
As you are in principle allowed to follow any convention, the logback code needs to be changed to accommodate other naming conventions.
Having said that, I was wondering why instead of appending "."+id to the logger name, you are not making use of the many features logback offers, such as markers or MDC to add additional data to your log statement. For one, one created a logger lives as long as the application. What do you actually do with the "id"?
was (Author: noreply.ceki at qos.ch):
Re opening
> Suggestion: Change logger name of inner classes.
> ------------------------------------------------
>
> Key: LBCLASSIC-102
> URL: http://jira.qos.ch/browse/LBCLASSIC-102
> Project: logback-classic
> Issue Type: Improvement
> Components: appender
> Affects Versions: 0.9.15
> Reporter: Joern Huxhorn
> Assignee: Logback dev list
> Fix For: 0.9.18
>
>
> At the moment, the logger name of inner classes is OuterClass$InnerClass.
> Because of that, the logging level of OuterClass isn't inherited by InnerClass at the moment.
> If LoggerFactory changed the logger name to OuterClass.InnerClass instead, InnerClass would inherit the logging level of OuterClass which seems intuitively correct.
> I'd suggest to accept both $InnerClass and .InnerClass style in logback configurations for compatibility and usability reasons.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the logback-dev
mailing list