Search in sources :

Example 11 with AppenderLoggingException

use of org.apache.logging.log4j.core.appender.AppenderLoggingException in project logging-log4j2 by apache.

the class RollingRandomAccessFileManager method writeToDestination.

@Override
protected synchronized void writeToDestination(final byte[] bytes, final int offset, final int length) {
    try {
        randomAccessFile.write(bytes, offset, length);
        size += length;
    } catch (final IOException ex) {
        final String msg = "Error writing to RandomAccessFile " + getName();
        throw new AppenderLoggingException(msg, ex);
    }
}
Also used : AppenderLoggingException(org.apache.logging.log4j.core.appender.AppenderLoggingException) IOException(java.io.IOException)

Aggregations

AppenderLoggingException (org.apache.logging.log4j.core.appender.AppenderLoggingException)11 Logger (org.apache.logging.log4j.Logger)3 Test (org.junit.Test)3 IOException (java.io.IOException)2 BufferedReader (java.io.BufferedReader)1 InputStream (java.io.InputStream)1 InputStreamReader (java.io.InputStreamReader)1 OutputStream (java.io.OutputStream)1 SQLException (java.sql.SQLException)1 ArrayList (java.util.ArrayList)1 ExecutorService (java.util.concurrent.ExecutorService)1 JMSException (javax.jms.JMSException)1 Message (javax.jms.Message)1 Marker (org.apache.logging.log4j.Marker)1 ThreadContext (org.apache.logging.log4j.ThreadContext)1 NullOutputStream (org.apache.logging.log4j.core.util.NullOutputStream)1 ReadOnlyStringMap (org.apache.logging.log4j.util.ReadOnlyStringMap)1