logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aus1977 <aus1...@gmail.com>
Subject Moving log4net config out of App.config
Date Wed, 23 Apr 2008 12:48:18 GMT

I need to move log4net configuration from app.config file and i have tryed
the following :

app.config file :
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <appSettings>
    <add key="Log4NetConfiguration" value="log4net.config" />
  </appSettings>
</configuration>

log4net.config file:
<log4net>
    
    <appender name="Framework.Manager"
type="log4net.Appender.RollingFileAppender">
      <file value="Logs\Gogimon.Framework.Manager.log.txt" />
      <appendToFile value="true" />
      <rollingStyle value="Size" />
      <maxSizeRollBackups value="1" />
      <maximumFileSize value="500KB" />
      <staticLogFileName value="true" />
      <layout type="log4net.Layout.PatternLayout">
        <conversionPattern value="%date %newline[%thread] %-5level %logger
[%ndc] &lt;%property{auth}&gt; - %message%newline%newline" />
      </layout>
    </appender>
    
<logger name="Framework.Manager" additivity="false">
      <level value="ALL" />
      <appender-ref ref="Gogimon.Framework.Manager" />
    </logger>
<log4net>

it is doesn't works 

-- 
View this message in context: http://www.nabble.com/Moving-log4net-config-out-of-App.config-tp16834575p16834575.html
Sent from the Log4net - Users mailing list archive at Nabble.com.


Mime
View raw message