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.

Reply via email to