[This is preliminary documentation and is subject to change.]

The net4log appender that submits reports to bugcollect.com.

Namespace:  bugcollect4net
Assembly:  bugcollect4net (in bugcollect4net.dll) Version: (


public class BugcollectAppender : BufferingAppenderSkeleton
Visual Basic (Declaration)
Public Class BugcollectAppender _
	Inherits BufferingAppenderSkeleton


log4net is a popular logging framework that allows applications to output log statements to a variety of output targets. This class allows log4net application to output the log to bugcollect.com as incident reports.
The bugcollect.com appender is a buffering appender and is based on the log4net.Appender.BufferingAppenderSkeleton skeleton. It submits one single Report for all logging events retained prior to the buffer flush. All logging events are formatted using the configured log4net layout. The resulted text is attached to the Notes of the submitted report. The exception or the location of the last logging event is used to set the report StackTrace. This way on typical log4net configurations, when the buffered appender is configured to send reports only when logging events occur that exceed a treshold severity, the logging events occuring prior to the send triggering event are reported as a captured log of the events that led to the event triggering the report, while the last event is reported as the cause of the report.


The BugcollecttAppender fits into your already existing log4net infrastructure. It can be added to any existing application that uses log4net by simply changing the application log4net configuration. This is a simple example how to use log4net:
ILog log = LogManager.GetLogger("application");

log.Info("Application Start");
log.Debug("This is a debug message");

if (log.IsDebugEnabled)
    log.Debug("This is another debug message");
For more examples of how to use log4net in your application, please refer to the log4net documentation.
The following example shows how to add the BugcollectAppender to an log4net application, using the application configuration file:
<?xml version="1.0" encoding="utf-8" ?>
        <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
        <appender name="BugcollectAppender" type="bugcollect4net.BugcollectAppender, bugcollect4net">
            <layout type="log4net.Layout.PatternLayout">
                <conversionPattern value="%date [%thread] %-5level %logger [%property{NDC}] - %message%newline" />
            <messagelayout type="log4net.Layout.PatternLayout">
                <conversionPattern value="%message%newline" />
            <evaluator type="log4net.Core.LevelEvaluator">
                <threshold value="WARN"/>
            <applicationName value="<your application name>"/>
            <applicationPassword value="<your application password>"/>
            <level value="INFO" />
            <appender-ref ref="BugcollectAppender" />

Inheritance Hierarchy


See Also