[ https://issues.apache.org/jira/browse/LOG4NET-534?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15706524#comment-15706524 ]
Jay McCormick commented on LOG4NET-534: --------------------------------------- Thanks Dominik for pointing me to the setting for InternalDebug. This most definitely pointed me in another direction. I'm getting this exception: 00000163 85.58250427 [8920] log4net: Output file [C:\Users\Jay\AppData\Local\TEMP\MyComputerName_MyProgramOne_Tuesday.log] already exists. Not appending to file. Rolling existing file out of the way. 00000164 85.58420563 [8920] log4net: Moving [C:\Users\Jay\AppData\Local\TEMP\MyComputerName_MyProgramOne_Tuesday.log] -> [C:\Users\Jay\AppData\Local\TEMP\MyComputerName_MyProgramOne_Tuesday.log.1] 00000165 85.58536530 [8920] log4net:ERROR [RollingFileAppender] ErrorCode: GenericFailure. Exception while rolling file [C:\Users\Jay\AppData\Local\TEMP\MyComputerName_MyProgramOne_Tuesday.log] -> [C:\Users\Jay\AppData\Local\TEMP\MyComputerName_MyProgramOne_Tuesday.log.1] 00000166 85.58871460 [8920] System.UnauthorizedAccessException: Access to the path is denied. 00000167 85.58871460 [8920] at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) 00000168 85.58871460 [8920] at System.IO.__Error.WinIOError() 00000169 85.58871460 [8920] at System.IO.File.InternalMove(String sourceFileName, String destFileName, Boolean checkHost) 00000170 85.58871460 [8920] at log4net.Appender.RollingFileAppender.RollFile(String fromFile, String toFile) 00000171 85.59036255 [8920] log4net:ERROR RollingFileAppender: INTERNAL ERROR. Append is False but OutputFile [C:\Users\Jay\AppData\Local\TEMP\MyComputerName_MyProgramOne_Tuesday.log] already exists. This seems similar to LOG4NET-506 which in turn points to LOG4NET-487. I also visited LOG4NET-118. I see code, but don't see a new test dll. I also 'get' the exception is saying 'no access' to move, but there is access to overwrite the existing file? That I don't understand. I figured it might have something to do with permissions. I'm a local admin on this Win10 machine. Checking Security Properties for the directory and file says Full Access. Not sure what to do next. Will Bing the exception for hints. > 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 > Labels: newbie > > 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" ?> > <configuration> > <!-- configSections MUST be first! --> > <configSections> > <section name="log4net" > type="log4net.Config.Log4NetConfigurationSectionHandler, log4net"/> > </configSections> > > <log4net> > <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}	%property{messageId}	%-5level	%message%newline"/> > </layout> > <filter type="log4net.Filter.LevelRangeFilter"> > <param name="LevelMin" value="ALL"/> > <param name="LevelMax" value="OFF"/> > </filter> > </appender> > <appender name="AsyncBufferingAppender-HotSwap" > type="AsyncForwardingAppenderHotSwap"> > <GrowType value="Grow"/> > <GrowLimit value="3000000"/> > <Fix value="4"/> > <appender-ref ref="MAINLogFile"/> > </appender> > <logger name="MAIN"> > <level value="INFO"/> > <appender-ref ref="AsyncBufferingAppender-HotSwap"/> > </logger> > </log4net> > <startup> > <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.1"/> > </startup> > <system.windows.forms jitDebugging="true"/> > <system.diagnostics> > <trace useGlobalLock="false"/> > </system.diagnostics> > </configuration> > 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 (v6.3.4#6332)