You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4net-dev@logging.apache.org by "Ron Grabowski (JIRA)" <ji...@apache.org> on 2008/11/12 01:25:44 UTC
[jira] Commented: (LOG4NET-179) Log file does not get created by
release version of App.exe
[ https://issues.apache.org/jira/browse/LOG4NET-179?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12646748#action_12646748 ]
Ron Grabowski commented on LOG4NET-179:
---------------------------------------
The code works the same in both Debug and Release modes when I changed the file name to something more meaningful. You can't lock nul:
log4net:ERROR [RollingFileAppender] OpenFile(\\.\nul,False) call failed.
log4net.Appender.FileAppender+LockingStream+LockStateException: The file is not currently locked
> Log file does not get created by release version of App.exe
> -----------------------------------------------------------
>
> Key: LOG4NET-179
> URL: https://issues.apache.org/jira/browse/LOG4NET-179
> Project: Log4net
> Issue Type: Test
> Affects Versions: 1.2.10
> Environment: Visual Studio 2005, language C#, OS Windows XP Professional
> Reporter: Shetal Shah
>
> I have a windows application that uses log4net.
> My app.config section has
> <log4net>
> <appender name="RollingFileAppender" type="log4net.Appender.RollingFileAppender">
> <file value="nul" />
> <appendToFile value="false" />
> <rollingStyle value="Size" />
> <maxSizeRollBackups value="10" />
> <maximumFileSize value="2MB" />
> <layout type="log4net.Layout.PatternLayout">
> <param name="ConversionPattern" value="%d [%t] %-5p %c [%x] - %m%n" />
> </layout>
> </appender>
> <root>
> <level value="ALL" />
> <appender-ref ref="RollingFileAppender" />
> <appender-ref ref="UdpAppender" />
> </root>
> </log4net>
> When I build my exe in debug mode and run it, it works fine and
> log4net.Repository.ILoggerRepository RootRep;
> RootRep = log4net.LogManager.GetRepository();
> RootRep is configured and has one appender.
> Now, same code but when I compile the exe in release mode, it does not create log file. RootRep is not configured and it has 0 appender.
> I am not sure what is different between debug and release exe.
> Any help is greatly appriciated.
> Thanks
> Shetal Shah
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.