Apache log4net� SDK Documentation - Microsoft .NET Framework 4.0

ConsoleAppender Class

Appends logging events to the console.

For a list of all members of this type, see ConsoleAppender Members.


public�class�ConsoleAppender : AppenderSkeleton

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.


ConsoleAppender appends log events to the standard output stream or the error output stream using a layout specified by the user.

By default, all output is written to the console's standard output stream. The Target property can be set to direct the output to the error stream.

NOTE: This appender writes each message to the System.Console.Out or System.Console.Error that is set at the time the event is appended. Therefore it is possible to programmatically redirect the output of this appender (for example NUnit does this to capture program output). While this is the desired behavior of this appender it may have security implications in your application.


Namespace: log4net.Appender

Assembly: log4net (in log4net.dll)

See Also

ConsoleAppender Members | log4net.Appender Namespace