logging-log4net-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jay McCormick (JIRA)" <j...@apache.org>
Subject [jira] [Created] (LOG4NET-534) rollingfileappender: INTERNAL ERROR. Append is False but OutputFile already exists
Date Tue, 22 Nov 2016 18:31:58 GMT
Jay McCormick created LOG4NET-534:

             Summary: rollingfileappender: INTERNAL ERROR. Append is False but OutputFile
already exists
                 Key: LOG4NET-534
                 URL: https://issues.apache.org/jira/browse/LOG4NET-534
             Project: Log4net
          Issue Type: Bug
          Components: Appenders
    Affects Versions: 1.2.15
         Environment: Windows 10
            Reporter: Jay McCormick

Have read about [LOG4NET-118] and [LOG4NET-485] but it looks like neither has a resolution.
 Existing log file is not being rolled, it is being overwritten instead.

Same code and config running on Windows 7, produces the error message in the summary.  Not
sure if UAC is a cause.  Log file is written into users %LOCALAPPDATA%\TEMP directory.  I
have read about some "internal" log4net logging, but do not know how to activate that.

The config:
<?xml version="1.0" encoding="utf-8" ?>
    <!-- configSections MUST be first! -->
        <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,
        <appender name="MAINLogFile" type="log4net.Appender.RollingFileAppender">
            <file type="log4net.Util.PatternString" value="%property{LogFileName}"/>
            <appendToFile value="false"/>
            <maximumFileSize value="20MB"/>
            <maxSizeRollBackups value="3"/>
            <param name="Encoding" value="unicodeFFFE"/>
            <layout type="log4net.Layout.PatternLayout">
                <conversionPattern value="%date{ISO8601}&#09;%property{messageId}&#09;%-5level&#09;%message%newline"/>
            <filter type="log4net.Filter.LevelRangeFilter">
                <param name="LevelMin" value="ALL"/>
                <param name="LevelMax" value="OFF"/>

        <appender name="AsyncBufferingAppender-HotSwap" type="AsyncForwardingAppenderHotSwap">
            <GrowType value="Grow"/>
            <GrowLimit value="3000000"/>
            <Fix value="4"/>
            <appender-ref ref="MAINLogFile"/>

        <logger name="MAIN">
            <level value="INFO"/>
            <appender-ref ref="AsyncBufferingAppender-HotSwap"/>

        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.1"/>

    <system.windows.forms jitDebugging="true"/>

        <trace useGlobalLock="false"/>

The AsyncBufferingAppender-HotSwap is borrowed from here:
*       Copied from .NET low latency logging. Part 5 - Asynchronous log4net solutions
*       http://deep-depth.blogspot.com/2014/02/net-low-latency-logging-part-5.html

(I also tried without the Asynchronous Appender as well)

This message was sent by Atlassian JIRA

View raw message