AspNetTraceAppender Class | Apache log4net™ SDK Documentation

Appends log events to the ASP.NET TraceContext system.

Inheritance Hierarchy

System
Object
log4net.Appender
AppenderSkeleton
log4net.Appender
AspNetTraceAppender

Namespace: log4net.Appender
Assembly: log4net (in log4net.dll) Version: 2.0.8.0-.NET 4.0
Syntax

C#
VB
C++
F#
Copy

    public class AspNetTraceAppender : AppenderSkeleton

    Public Class AspNetTraceAppender
    	Inherits AppenderSkeleton

    public ref class AspNetTraceAppender : public AppenderSkeleton

    type AspNetTraceAppender =
        class
            inherit AppenderSkeleton
        end

The AspNetTraceAppender type exposes the following members.

Constructors

| Name | Description
--- | --- | ---
| AspNetTraceAppender | Initializes a new instance of the AspNetTraceAppender class.

Top
Properties

| Name | Description
--- | --- | ---
| Category | The category parameter sent to the Trace method.
| ErrorHandler | Gets or sets the IErrorHandler for this appender. (Inherited from AppenderSkeleton.)
| FilterHead | The filter chain. (Inherited from AppenderSkeleton.)
| Layout | Gets or sets the ILayout for this appender. (Inherited from AppenderSkeleton.)
| Name | Gets or sets the name of this appender. (Inherited from AppenderSkeleton.)
| RequiresLayout | This appender requires a log4net.Layout to be set. (Overrides AppenderSkeleton RequiresLayout.)
| Threshold | Gets or sets the threshold Level of this appender. (Inherited from AppenderSkeleton.)

Top
Methods

| Name | Description
--- | --- | ---
| ActivateOptions | Initialize the appender based on the options set (Inherited from AppenderSkeleton.)
| AddFilter | Adds a filter to the end of the filter chain. (Inherited from AppenderSkeleton.)
| Append( LoggingEvent ) | Append a bulk array of logging events. (Inherited from AppenderSkeleton.)
| Append(LoggingEvent) | Write the logging event to the ASP.NET trace (Overrides AppenderSkeleton Append(LoggingEvent).)
| ClearFilters | Clears the filter list for this appender. (Inherited from AppenderSkeleton.)
| Close | Closes the appender and release resources. (Inherited from AppenderSkeleton.)
| DoAppend(LoggingEvent) | Performs threshold checks and invokes filters before delegating actual logging to the subclasses specific [M:Append(LoggingEvent)] method. (Inherited from AppenderSkeleton.)
| DoAppend( LoggingEvent ) | Performs threshold checks and invokes filters before delegating actual logging to the subclasses specific [M:Append(LoggingEvent[])] method. (Inherited from AppenderSkeleton.)
| Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
| FilterEvent | Test if the logging event should we output by this appender (Inherited from AppenderSkeleton.)
| Finalize | Finalizes this appender by calling the implementation's Close method. (Inherited from AppenderSkeleton.)
| Flush | Flushes any buffered log data. (Inherited from AppenderSkeleton.)
| GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.)
| GetType | Gets the Type of the current instance. (Inherited from Object.)
| IsAsSevereAsThreshold | Checks if the message level is below this appender's threshold. (Inherited from AppenderSkeleton.)
| MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.)
| OnClose | Is called when the appender is closed. Derived classes should override this method if resources need to be released. (Inherited from AppenderSkeleton.)
| PreAppendCheck | Called before [M:Append(LoggingEvent)] as a precondition. (Inherited from AppenderSkeleton.)
| RenderLoggingEvent(LoggingEvent) | Renders the LoggingEvent to a string. (Inherited from AppenderSkeleton.)
| RenderLoggingEvent(TextWriter, LoggingEvent) | Renders the LoggingEvent to a string. (Inherited from AppenderSkeleton.)
| ToString | Returns a String that represents the current Object. (Inherited from Object.)

Top
Remarks

Diagnostic information and tracing messages that you specify are appended to the output of the page that is sent to the requesting browser. Optionally, you can view this information from a separate trace viewer (Trace.axd) that displays trace information for every page in a given application.

Trace statements are processed and displayed only when tracing is enabled. You can control whether tracing is displayed to a page, to the trace viewer, or both.

The logging event is passed to the Write(string) or Warn(string) method depending on the level of the logging event. The event's logger name is the default value for the category parameter of the Write/Warn method.

See Also

#### Reference

log4net.Appender Namespace