Note that there are some explanatory texts on larger screens.

plurals
  1. POCan't get Log4Net to work in our WCF application
    primarykey
    data
    text
    <p>We are trying to use Log4Net to log from our IIS 6-deployed WCF Application. We are trying to log to a file, but can't seem to get the log files to be created, let alone see the logging output in them. The pertinent pieces of out web.config are:</p> <pre><code>&lt;sectionGroup name="common"&gt; &lt;section name="logging" type="Common.Logging.ConfigurationSectionHandler, Common.Logging" /&gt; &lt;/sectionGroup&gt; ... &lt;common&gt; &lt;logging&gt; &lt;factoryAdapter type="Common.Logging.Simple.TraceLoggerFactoryAdapter, Common.Logging"&gt; &lt;arg key="level" value="INFO" /&gt; &lt;arg key="showLogName" value="true" /&gt; &lt;arg key="showDataTime" value="true" /&gt; &lt;arg key="dateTimeFormat" value="yyyy/MM/dd HH:mm:ss:fff" /&gt; &lt;/factoryAdapter&gt; &lt;/logging&gt; &lt;/common&gt; &lt;log4net&gt; &lt;appender name="FileAppender" type="log4net.Appender.RollingFileAppender"&gt; &lt;param name="File" value="c:\logs\ApplicationInfoTest.log" /&gt; &lt;threshold value="INFO" /&gt; &lt;param name="AppendToFile" value="true" /&gt; &lt;param name="DatePattern" value="ddMMyyyy" /&gt; &lt;param name="MaxSizeRollBackups" value="10" /&gt; &lt;param name="MaximumFileSize" value="10MB" /&gt; &lt;param name="RollingStyle" value="Size" /&gt; &lt;param name="StaticLogFileName" value="true" /&gt; &lt;layout type="log4net.Layout.PatternLayout"&gt; &lt;param name="Header" value="\r\n\r\n---------------------------------------------\r\n" /&gt; &lt;param name="Footer" value="\r\n---------------------------------------------\r\n\r\n" /&gt; &lt;param name="ConversionPattern" value="%d [%t] %-5p - %m%n" /&gt; &lt;/layout&gt; &lt;/appender&gt; &lt;root&gt; &lt;level value="INFO" /&gt; &lt;appender-ref ref="FileAppender" /&gt; &lt;/root&gt; &lt;/log4net&gt; </code></pre> <p>With this configuration we can see INFO level logging coming out of our application when using DebugView, but it is clear that this is from the piece and not the<br> piece. </p> <p>Is there something that we have failed to set up in web.config? Is it a permissions issue with the directory we have created for the logs to be written to?</p> <p>Please point out our obvious mistake.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload