logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Remko Popma (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LOG4J2-1521) StringIndexOutOfBoundsException thrown when rolling logs
Date Tue, 16 Aug 2016 11:39:20 GMT

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

Remko Popma commented on LOG4J2-1521:
-------------------------------------

Away from PC, can't open attachments. Could you also specify your full configuration?

> StringIndexOutOfBoundsException thrown when rolling logs
> --------------------------------------------------------
>
>                 Key: LOG4J2-1521
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-1521
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.6.2
>         Environment: Windows 10 Pro 64-bit (10.0, Build 14393) (14393.rs1_release.160715-1616)
> java version "1.8.0_73"
> Java(TM) SE Runtime Environment (build 1.8.0_73-b02)
> Java HotSpot(TM) 64-Bit Server VM (build 25.73-b02, mixed mode)
>            Reporter: Johno Crawford
>         Attachments: log4j2-events.zip
>
>
> When prototyping with log4j I ran into an issue with rolling log files.
> {noformat}
> 2016-08-16 08:26:25,304 main ERROR An exception occurred processing Appender TABLE1-appender
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
> 	at java.lang.AbstractStringBuilder.setCharAt(AbstractStringBuilder.java:380)
> 	at java.lang.StringBuilder.setCharAt(StringBuilder.java:76)
> 	at org.apache.logging.log4j.core.util.datetime.FastDatePrinter$PaddedNumberField.appendTo(FastDatePrinter.java:895)
> 	at org.apache.logging.log4j.core.util.datetime.FastDatePrinter$PaddedNumberField.appendTo(FastDatePrinter.java:880)
> 	at org.apache.logging.log4j.core.util.datetime.FastDatePrinter.applyRules(FastDatePrinter.java:479)
> 	at org.apache.logging.log4j.core.util.datetime.FastDatePrinter.format(FastDatePrinter.java:454)
> 	at org.apache.logging.log4j.core.util.datetime.FastDatePrinter.format(FastDatePrinter.java:442)
> 	at org.apache.logging.log4j.core.util.datetime.FastDateFormat.format(FastDateFormat.java:427)
> 	at org.apache.logging.log4j.core.pattern.DatePatternConverter$PatternFormatter.formatToBuffer(DatePatternConverter.java:70)
> 	at org.apache.logging.log4j.core.pattern.DatePatternConverter.formatWithoutAllocation(DatePatternConverter.java:259)
> 	at org.apache.logging.log4j.core.pattern.DatePatternConverter.format(DatePatternConverter.java:251)
> 	at org.apache.logging.log4j.core.pattern.DatePatternConverter.format(DatePatternConverter.java:238)
> 	at org.apache.logging.log4j.core.pattern.DatePatternConverter.format(DatePatternConverter.java:290)
> 	at org.apache.logging.log4j.core.pattern.DatePatternConverter.format(DatePatternConverter.java:299)
> 	at org.apache.logging.log4j.core.appender.rolling.PatternProcessor.formatFileName(PatternProcessor.java:248)
> 	at org.apache.logging.log4j.core.appender.rolling.PatternProcessor.formatFileName(PatternProcessor.java:233)
> 	at org.apache.logging.log4j.core.appender.rolling.DefaultRolloverStrategy.purgeAscending(DefaultRolloverStrategy.java:323)
> 	at org.apache.logging.log4j.core.appender.rolling.DefaultRolloverStrategy.purge(DefaultRolloverStrategy.java:306)
> 	at org.apache.logging.log4j.core.appender.rolling.DefaultRolloverStrategy.rollover(DefaultRolloverStrategy.java:524)
> 	at org.apache.logging.log4j.core.appender.rolling.RollingFileManager.rollover(RollingFileManager.java:220)
> 	at org.apache.logging.log4j.core.appender.rolling.RollingFileManager.rollover(RollingFileManager.java:155)
> 	at org.apache.logging.log4j.core.appender.rolling.RollingFileManager.checkRollover(RollingFileManager.java:150)
> 	at org.apache.logging.log4j.core.appender.RollingFileAppender.append(RollingFileAppender.java:85)
> 	at org.apache.logging.log4j.core.config.AppenderControl.tryCallAppender(AppenderControl.java:155)
> 	at org.apache.logging.log4j.core.config.AppenderControl.callAppender0(AppenderControl.java:128)
> 	at org.apache.logging.log4j.core.config.AppenderControl.callAppenderPreventRecursion(AppenderControl.java:119)
> 	at org.apache.logging.log4j.core.config.AppenderControl.callAppender(AppenderControl.java:84)
> 	at org.apache.logging.log4j.core.config.LoggerConfig.callAppenders(LoggerConfig.java:390)
> 	at org.apache.logging.log4j.core.config.LoggerConfig.processLogEvent(LoggerConfig.java:375)
> 	at org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:359)
> 	at org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:349)
> 	at org.apache.logging.log4j.core.config.AwaitCompletionReliabilityStrategy.log(AwaitCompletionReliabilityStrategy.java:63)
> 	at org.apache.logging.log4j.core.Logger.logMessage(Logger.java:146)
> 	at org.apache.logging.log4j.spi.AbstractLogger.logMessage(AbstractLogger.java:1988)
> 	at org.apache.logging.log4j.spi.AbstractLogger.logIfEnabled(AbstractLogger.java:1960)
> 	at org.apache.logging.log4j.spi.AbstractLogger.info(AbstractLogger.java:1297)
> 	at Main.main(Main.java:60)
> {noformat}



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