Log4net doesn't process the file attribute. I'm not sure how you're using it. These two nodes are processed identically during configuration:
<param name="Hello" value="World" /> <Hello value="World "/> ________________________________ From: Eric Chamberlain <eric.chamberl...@stratagen.com> To: Log4NET User <log4net-user@logging.apache.org> Sent: Friday, June 19, 2009 12:56:34 PM Subject: RE: Mystery concerning configuration SOLVED. I have discovered the source of the problem. We had split out the <log4net> configuration from the web.config but with a redirection left inside the web.config of the form: <log4net file="other_config_directory/log4net.config" /> The file at the end was of the correct syntax and could be used by log4net but only to the extent that we used the <param...> elements. I have modified the program to initialized log4net directly from the split-out file and it works with full syntactical support. Go figure, eh? == Eric == ________________________________ From:Eric Chamberlain <eric.chamberl...@stratagen.com> To: log4net-user@logging.apache.org Sent: Thursday, June 18, 2009 6:41:51 PM Subject: Mystery concerning configuration Greetings all, I have an appender which works fine if specified with generic XML but not when specified with conventional log4net terms in the configuration. Examples should help: The following works: <appendername="LogServiceAppender" type="log4net.Appender.RollingFileAppender"> <paramname="File" value="myfile.log"/> <paramname="AppendToFile" value="true"/> <paramname="MaxSizeRollBackups" value="10"/> <paramname="MaximumFileSize" value="1MB"/> <paramname="RollingStyle" value="Size"/> <paramname="StaticLogFileName" value="true"/> <layouttype="log4net.Layout.PatternLayout"> <paramname="ConversionPattern" value="%d{yyyy MMM dd HH:mm:ss} [%t] %-5p - %m%n"/> </layout> </appender> But the following does *not* work. It fails to initialize (I turned on the log4net debugging to see it). <appendername="LogServiceAppender" type="log4net.Appender.RollingFileAppender"> <filevalue="myfile.log"/> <appendToFilevalue="true"/> <maxSizeRollBackupsvalue="10"/> <maximumFileSizevalue="1MB"/> <rollingStylevalue="Size"/> <staticLogFileNamevalue="true"/> <layouttype="log4net.Layout.PatternLayout"> <conversionPatternvalue="%d{yyyy MMM dd HH:mm:ss} [%t] %-5p - %m%n"/> </layout> </appender> It appears that log4net initialization does not recognized its own XML schema. How is that possible? ______________________________________________________________________ Eric Chamberlain