logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Weaver <icodemar...@gmail.com>
Subject Re: add custom appender separate from log4net dll
Date Fri, 10 Dec 2004 14:18:45 GMT
I created a custom appender outside of the log4net project.

Create the custom appender in its own project. Reference the log4net
assembly and setup the namespaces accordingly.

namespace Global.Diagnostics.log4net.Custom.Appender
	/// <summary>
	/// Summary description for EventLogAppender.
	/// </summary>
	public class EventLogAppenderEx : AppenderSkeleton

Then to reference the custom appender put this in your configuration file:

	<log4net debug="true">
		<!-- <appender name="EventLogAppenderEx"
type="log4net.Appender.EventLogAppender" > -->
		<appender name="EventLogAppenderEx"
Global.Diagnostics.Log4Net.Custom, Version=">


On Thu,  9 Dec 2004 16:23:49 -0600, Simon Wallis <mailing@wallis.ca> wrote:
> Hi,
> I wrote a custom appender, put it in the Appenders folder and recompiled the log4net
dll. Is there a better way to do this? I think my custom log4net.dll is causing me problems
and compatibility issues.
> How can I add a new appender and not modify the core dll? Should it go in it's own project
somehow? I think this is a general .NET question, and sorry I'm still relatively new.
> Thanks for your help,
> Simon.

View raw message