You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4net-user@logging.apache.org by Marco Dissel <md...@home.nl> on 2004/06/15 13:58:47 UTC

config is not read with COM Addin

Hello

I created an Outlook addin and want to use log4net for logging. If i debug my addin within VS.NET the log4net assembly is loaded. Log.Debug("blalaaa") is not resulting in a logentry. and no log4net debug info is logged (debug=true in the config file) to the debug window in vs.net. 

I added these lines to the assembly.cs:
[assembly: log4net.Config.Domain("Addin")]
[assembly: log4net.Config.DOMConfigurator(ConfigFileExtension="log4net", Watch=true)]

My logfile is named Addin.dll.log4net and contains these settings:
<?xml version="1.0" encoding="utf-8" ?>
<log4net debug="true">
	<appender name="Default" type="log4net.Appender.RollingFileAppender">
		<param name="File" value="log.txt" />
		<param name="AppendToFile" value="true" />
		<param name="RollingStyle" value="Size" />
		<param name="MaxSizeRollBackups" value="10" />
		<param name="MaximumFileSize" value="500KB" />
		<param name="StaticLogFileName" value="true" />
		<layout type="log4net.Layout.PatternLayout">
			<param name="ConversionPattern" value="%d [%t] %-5p %c [%x] - %m%n" />
		</layout>
	</appender>

	<root>
		<level value="DEBUG" />
		<appender-ref ref="Default" />
	</root>
</log4net>


What's wrong?

Thanks

Marco