TextWriterAppender ClassApache log4net™ SDK Documentation
Sends logging events to a TextWriter.
Inheritance Hierarchy

SystemObject
  log4net.AppenderAppenderSkeleton
    log4net.AppenderTextWriterAppender
      log4net.AppenderFileAppender

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

public class TextWriterAppender : AppenderSkeleton

The TextWriterAppender type exposes the following members.

Constructors

  NameDescription
Public methodTextWriterAppender
Initializes a new instance of the TextWriterAppender class.
Public methodTextWriterAppender(ILayout, Stream) Obsolete.
Initializes a new instance of the TextWriterAppender class and sets the output destination to a new StreamWriter initialized with the specified Stream.
Public methodTextWriterAppender(ILayout, TextWriter) Obsolete.
Initializes a new instance of the TextWriterAppender class and sets the output destination to the specified StreamWriter.
Top
Properties

  NameDescription
Public propertyErrorHandler
Gets or set the IErrorHandler and the underlying QuietTextWriter, if any, for this appender.
(Overrides AppenderSkeletonErrorHandler.)
Public propertyFilterHead
The filter chain.
(Inherited from AppenderSkeleton.)
Public propertyImmediateFlush
Gets or set whether the appender will flush at the end of each append operation.
Public propertyLayout
Gets or sets the ILayout for this appender.
(Inherited from AppenderSkeleton.)
Public propertyName
Gets or sets the name of this appender.
(Inherited from AppenderSkeleton.)
Protected propertyQuietWriter
Gets or sets the QuietTextWriter where logging events will be written to.
Protected propertyRequiresLayout
This appender requires a log4net.Layout to be set.
(Overrides AppenderSkeletonRequiresLayout.)
Public propertyThreshold
Gets or sets the threshold Level of this appender.
(Inherited from AppenderSkeleton.)
Public propertyWriter
Sets the TextWriter where the log output will go.
Top
Methods

  NameDescription
Public methodActivateOptions
Initialize the appender based on the options set
(Inherited from AppenderSkeleton.)
Public methodAddFilter
Adds a filter to the end of the filter chain.
(Inherited from AppenderSkeleton.)
Protected methodAppend(LoggingEvent)
This method is called by the DoAppend(LoggingEvent) method.
(Overrides AppenderSkeletonAppend(LoggingEvent).)
Protected methodAppend(LoggingEvent)
This method is called by the DoAppend(LoggingEvent) method.
(Overrides AppenderSkeletonAppend(LoggingEvent).)
Public methodClearFilters
Clears the filter list for this appender.
(Inherited from AppenderSkeleton.)
Public methodClose
Closes the appender and release resources.
(Inherited from AppenderSkeleton.)
Protected methodCloseWriter
Closes the underlying TextWriter.
Public methodDoAppend(LoggingEvent)
Performs threshold checks and invokes filters before delegating actual logging to the subclasses specific [M:Append(LoggingEvent)] method.
(Inherited from AppenderSkeleton.)
Public methodDoAppend(LoggingEvent)
Performs threshold checks and invokes filters before delegating actual logging to the subclasses specific [M:Append(LoggingEvent[])] method.
(Inherited from AppenderSkeleton.)
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFilterEvent
Test if the logging event should we output by this appender
(Inherited from AppenderSkeleton.)
Protected methodFinalize
Finalizes this appender by calling the implementation's Close method.
(Inherited from AppenderSkeleton.)
Public methodFlush
Flushes any buffered log data.
(Overrides AppenderSkeletonFlush(Int32).)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodIsAsSevereAsThreshold
Checks if the message level is below this appender's threshold.
(Inherited from AppenderSkeleton.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodOnClose
Close this appender instance. The underlying stream or writer is also closed.
(Overrides AppenderSkeletonOnClose.)
Protected methodPreAppendCheck
This method determines if there is a sense in attempting to append.
(Overrides AppenderSkeletonPreAppendCheck.)
Protected methodPrepareWriter
Called to allow a subclass to lazily initialize the writer
Protected methodRenderLoggingEvent(LoggingEvent)
Renders the LoggingEvent to a string.
(Inherited from AppenderSkeleton.)
Protected methodRenderLoggingEvent(TextWriter, LoggingEvent)
Renders the LoggingEvent to a string.
(Inherited from AppenderSkeleton.)
Protected methodReset
Clears internal references to the underlying TextWriter and other variables.
Public methodToString
Returns a String that represents the current Object.
(Inherited from Object.)
Protected methodWriteFooter
Writes a footer as produced by the embedded layout's Footer property.
Protected methodWriteFooterAndCloseWriter
Writes the footer and closes the underlying TextWriter.
Protected methodWriteHeader
Writes a header produced by the embedded layout's Header property.
Top
Remarks

An Appender that writes to a TextWriter.

This appender may be used stand alone if initialized with an appropriate writer, however it is typically used as a base class for an appender that can open a TextWriter to write to.

See Also

Reference