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

Remko Popma edited comment on LOG4J2-636 at 9/22/14 10:12 AM:
--------------------------------------------------------------

Here is the config file: 
{code}
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="TRACE" monitorInterval="30">
  <Appenders>
    <Console name="Console" target="SYSTEM_OUT">
      <PatternLayout pattern="%d{yyyy/MM/dd HH:mm:ss.SSS} [%t] %-5level 
%logger{36} - %msg%n"/>
    </Console>
    <RollingRandomAccessFile name="RollingRandomAccessFile" 
fileName="logs/CALEEBaskets.log"
                 
filePattern="logs/CALEEBaskets.$${date:yyyy-MM}/CALEEBaskets-%d{MM-dd-yyyy}-%i.log.gz">
      <PatternLayout pattern="%d{yyyy/MM/dd HH:mm:ss.SSS} [%t] %-5level 
%logger{36} - %msg%n"/>
      <Policies>
        <OnStartupTriggeringPolicy />
        <TimeBasedTriggeringPolicy />
        <SizeBasedTriggeringPolicy size="250 MB"/>
      </Policies>
    </RollingRandomAccessFile>
  </Appenders>
  <Loggers>
    <Root level="debug">
      <AppenderRef ref="Console"/>
      <AppenderRef ref="RollingRandomAccessFile"/>
    </Root>
  </Loggers>
</Configuration>
{code}



was (Author: adrianwilford):
Here is the config file: 
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="TRACE" monitorInterval="30">
  <Appenders>
    <Console name="Console" target="SYSTEM_OUT">
      <PatternLayout pattern="%d{yyyy/MM/dd HH:mm:ss.SSS} [%t] %-5level 
%logger{36} - %msg%n"/>
    </Console>
    <RollingRandomAccessFile name="RollingRandomAccessFile" 
fileName="logs/CALEEBaskets.log"
                 
filePattern="logs/CALEEBaskets.$${date:yyyy-MM}/CALEEBaskets-%d{MM-dd-yyyy}-%i.log.gz">
      <PatternLayout pattern="%d{yyyy/MM/dd HH:mm:ss.SSS} [%t] %-5level 
%logger{36} - %msg%n"/>
      <Policies>
        <OnStartupTriggeringPolicy />
        <TimeBasedTriggeringPolicy />
        <SizeBasedTriggeringPolicy size="250 MB"/>
      </Policies>
    </RollingRandomAccessFile>
  </Appenders>
  <Loggers>
    <Root level="debug">
      <AppenderRef ref="Console"/>
      <AppenderRef ref="RollingRandomAccessFile"/>
    </Root>
  </Loggers>
</Configuration>

> IOException: Stream Closed RollingRandomAccessFile
> --------------------------------------------------
>
>                 Key: LOG4J2-636
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-636
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Appenders
>    Affects Versions: 2.0-rc1
>         Environment: Linux 3.2.0-4-amd64 #1 SMP Debian 3.2.54-2 x86_64 
> GNU/Linux
>            Reporter: Adrian Wilford
>            Assignee: Remko Popma
>              Labels: Rollover
>             Fix For: 2.1
>
>
> After some time, RollingRandomAccessFile can no longer write logging events 
> (have not run out of disk space).
> {code}
> 2014-05-13 10:05:18,284 ERROR Unable to write to stream logs/CALEEBaskets.log 
> for appender RollingRandomAccessFile
> 2014-05-13 10:05:18,284 ERROR An exception occurred processing Appender 
> RollingRandomAccessFile 
> org.apache.logging.log4j.core.appender.AppenderLoggingException: Error 
> writing to RandomAccessFile logs/CALEEBaskets.log
>       at 
> org.apache.logging.log4j.core.appender.rolling.RollingRandomAccessFileManager.flush(RollingRandomAccessFileManager.java:109)
>       at 
> org.apache.logging.log4j.core.appender.rolling.RollingRandomAccessFileManager.write(RollingRandomAccessFileManager.java:90)
>       at 
> org.apache.logging.log4j.core.appender.OutputStreamManager.write(OutputStreamManager.java:129)
>       at 
> org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.append(AbstractOutputStreamAppender.java:120)
>       at 
> org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender.append(RollingRandomAccessFileAppender.java:96)
>       at 
> org.apache.logging.log4j.core.config.AppenderControl.callAppender(AppenderControl.java:97)
>       at 
> org.apache.logging.log4j.core.config.LoggerConfig.callAppenders(LoggerConfig.java:425)
>       at 
> org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:406)
>       at 
> org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:367)
>       at org.apache.logging.log4j.core.Logger.log(Logger.java:112)
>       at 
> org.apache.logging.log4j.spi.AbstractLogger.debug(AbstractLogger.java:338)
>       at 
> com.corticalSystems.CALEE.algorithms.baskets.persistence.orderLogging.OrderLoggingDAL.createNewOrder(OrderLoggingDAL.java:163)
>       at 
> com.corticalSystems.CALEE.algorithms.baskets.logic.ConstituentLogicThread.sendNewOrder(ConstituentLogicThread.java:1087)
>       at 
> com.corticalSystems.CALEE.algorithms.baskets.logic.ConstituentLogicThread.run(ConstituentLogicThread.java:1587)
>       at java.lang.Thread.run(Thread.java:744)
> Caused by: java.io.IOException: Stream Closed
>       at java.io.RandomAccessFile.writeBytes0(Native Method)
>       at java.io.RandomAccessFile.writeBytes(RandomAccessFile.java:520)
>       at java.io.RandomAccessFile.write(RandomAccessFile.java:550)
>       at 
> org.apache.logging.log4j.core.appender.rolling.RollingRandomAccessFileManager.flush(RollingRandomAccessFileManager.java:106)
>       ... 14 more
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org

Reply via email to