[logback-dev] [JIRA] Commented: (LBCLASSIC-306) Mixing periods and dollar signs in a logger name causes IllegalArgumentException from LoggerFactory.getLogger

Michael Pilquist (JIRA) noreply-jira at qos.ch
Tue Nov 8 13:33:12 CET 2011


    [ http://jira.qos.ch/browse/LBCLASSIC-306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12294#action_12294 ] 

Michael Pilquist commented on LBCLASSIC-306:
--------------------------------------------

Sorry, I'm not sure what you mean.  Using the string "a.b$c.d" results in an IllegalArgumentException on every invocation of LoggerFactory.getLogger.  The second example was just to show that using a period after a dollar sign works as long as there's no period before the dollar sign.

> Mixing periods and dollar signs in a logger name causes IllegalArgumentException from LoggerFactory.getLogger
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: LBCLASSIC-306
>                 URL: http://jira.qos.ch/browse/LBCLASSIC-306
>             Project: logback-classic
>          Issue Type: Bug
>    Affects Versions: 1.0.0
>            Reporter: Michael Pilquist
>            Assignee: Logback dev list
>
> When mixing periods and dollar signs in a logger name, an IllegalArgumentException is thrown from LoggerFactory.getLogger:
> scala> org.slf4j.LoggerFactory.getLogger("a.b$c.d")
> java.lang.IllegalArgumentException: For logger [a] child name [a.b$c passed as parameter, may not include '.' after index2
> 	at ch.qos.logback.classic.Logger.createChildByName(Logger.java:386)
> 	at ch.qos.logback.classic.LoggerContext.getLogger(LoggerContext.java:152)
> 	at ch.qos.logback.classic.LoggerContext.getLogger(LoggerContext.java:48)
> 	at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:253)
> Note that the following works:
> scala> org.slf4j.LoggerFactory.getLogger("a$b.c")
> res0: org.slf4j.Logger = Logger[a$b.c]

-- 
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