[Bug 8] New: The insertion of a percent symbol causes the Parser to crash

http://bugzilla.qos.ch/show_bug.cgi?id=8 Summary: The insertion of a percent symbol causes the Parser to crash Product: logback-core Version: unspecified Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: Pattern AssignedTo: logback-dev@qos.ch ReportedBy: noreply.sebastien@qos.ch When inserting the percent char twice, so that it appears in the PatternLayout output, a number format exception is thrown. It does not prevent from using normally the PatternLayout. trace: ERROR in ch.qos.logback.core.joran.spi.Interpreter@131f71a - Exception in Action for tag <layout>8:14 java.lang.NumberFormatException: For input string: "% %" java.lang.NumberFormatException: For input string: "% %" at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48) at java.lang.Integer.parseInt(Integer.java:447) at java.lang.Integer.parseInt(Integer.java:497) at ch.qos.logback.core.pattern.FormatInfo.valueOf(FormatInfo.java:70) at ch.qos.logback.core.pattern.parser.Parser.T(Parser.java:84) at ch.qos.logback.core.pattern.parser.Parser.E(Parser.java:51) at ch.qos.logback.core.pattern.parser.Parser.Eopt(Parser.java:107) at ch.qos.logback.core.pattern.parser.Parser.E(Parser.java:55) at ch.qos.logback.core.pattern.parser.Parser.Eopt(Parser.java:107) at ch.qos.logback.core.pattern.parser.Parser.E(Parser.java:55) at ch.qos.logback.core.pattern.parser.Parser.Eopt(Parser.java:107) at ch.qos.logback.core.pattern.parser.Parser.E(Parser.java:55) at ch.qos.logback.core.pattern.parser.Parser.Eopt(Parser.java:107) at ch.qos.logback.core.pattern.parser.Parser.E(Parser.java:55) at ch.qos.logback.core.pattern.parser.Parser.Eopt(Parser.java:107) at ch.qos.logback.core.pattern.parser.Parser.E(Parser.java:55) at ch.qos.logback.core.pattern.parser.Parser.Eopt(Parser.java:107) at ch.qos.logback.core.pattern.parser.Parser.E(Parser.java:55) at ch.qos.logback.core.pattern.parser.Parser.Eopt(Parser.java:107) at ch.qos.logback.core.pattern.parser.Parser.E(Parser.java:55) at ch.qos.logback.core.pattern.parser.Parser.Eopt(Parser.java:107) at ch.qos.logback.core.pattern.parser.Parser.E(Parser.java:55) at ch.qos.logback.core.pattern.parser.Parser.parse(Parser.java:31) at ch.qos.logback.core.pattern.PatternLayoutBase.start(PatternLayoutBase.java:76) at ch.qos.logback.core.joran.action.AbstractLayoutAction.end(AbstractLayoutAction.java:75) at ch.qos.logback.core.joran.spi.Interpreter.callEndAction(Interpreter.java:289) at ch.qos.logback.core.joran.spi.Interpreter.endElement(Interpreter.java:152) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:633) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanEndElement(XMLNSDocumentScannerImpl.java:719) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1685) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242) at javax.xml.parsers.SAXParser.parse(SAXParser.java:375) at ch.qos.logback.core.joran.JoranConfiguratorBase.doConfigure(JoranConfiguratorBase.java:125) at ch.qos.logback.core.joran.JoranConfiguratorBase.doConfigure(JoranConfiguratorBase.java:101) at ch.qos.logback.core.joran.JoranConfiguratorBase.doConfigure(JoranConfiguratorBase.java:84) at ch.qos.logback.core.joran.JoranConfiguratorBase.doConfigure(JoranConfiguratorBase.java:77) at mainPackage.ConfigTester.main(ConfigTester.java:21) -- Configure bugmail: http://bugzilla.qos.ch/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.

http://bugzilla.qos.ch/show_bug.cgi?id=8 ------- Comment #1 from noreply.sebastien@qos.ch 2006-09-19 11:54 ------- configuration used: <configuration> <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> <layout class="ch.qos.logback.classic.PatternLayout"> <param name="Pattern" value="%-4relative [%thread] %-5level - %msg %% %n" /> </layout> </appender> <root> <level value="debug" /> <appender-ref ref="STDOUT" /> </root> </configuration> -- Configure bugmail: http://bugzilla.qos.ch/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.

http://bugzilla.qos.ch/show_bug.cgi?id=8 ------- Comment #2 from noreply.ceki@qos.ch 2006-10-04 18:45 ------- Hello Sebastien, Was this bug fixed? If it was, it should be closed. -- Configure bugmail: http://bugzilla.qos.ch/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.

http://bugzilla.qos.ch/show_bug.cgi?id=8 noreply.sebastien@qos.ch changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |major Priority|P2 |P1 ------- Comment #3 from noreply.sebastien@qos.ch 2006-11-30 17:16 ------- This is not fixed yet. I've changed it's priority and severity. -- Configure bugmail: http://bugzilla.qos.ch/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.

http://bugzilla.qos.ch/show_bug.cgi?id=8 noreply.ceki@qos.ch changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|major |blocker Status|NEW |ASSIGNED -- Configure bugmail: http://bugzilla.qos.ch/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.

http://bugzilla.qos.ch/show_bug.cgi?id=8 noreply.ceki@qos.ch changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED ------- Comment #4 from noreply.ceki@qos.ch 2008-03-19 19:15 ------- Given that in the context of conversion patterns the percent sign carries special meaning, in order to include the percent sign as a literal, you need to escape it with a backslash. I have updated the documentation accordingly. -- Configure bugmail: http://bugzilla.qos.ch/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
participants (1)
-
bugzilla-daemon@pixie.qos.ch