Class Logger

Logger class

Provides the logging functionality.

public sealed class Logger : IDisposable

Properties

NameDescription
static Debug { get; }Gets the debug logger.
Appenders { get; set; }Gets or sets the appender list.
Name { get; }Gets or sets name.
Severity { get; set; }Gets or sets severity.

Methods

NameDescription
Dispose()Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
IsEnabled(LogLevel)Determines if logging is enabled for the specified level.
Write(object)Writes the specified message to appenders.
Write(string)Writes the specified message to appenders.
Write(string, Exception)Writes the specified message and exception to appenders.
Write(string, Exception, LogLevel)Writes the specified message and exception to appenders.
WriteFormat(string, params object[])Writes the message with specified format to appenders.
WriteIf(bool, object)Writes the specified message to appenders if condition is true.
WriteIf(bool, string)Writes the specified message to appenders if condition is true.
WriteIf(LogLevel, string)Writes the specified message if the log level is enabled.
WriteIf(bool, object, Exception)Writes the specified message and exception to appenders if condition is true.
WriteIf(LogLevel, string, Exception)Writes the specified message and exception if the log level is enabled.
WriteLine()Writes the empty line to appenders.
WriteLine(object)Writes the specified message to appenders.
WriteLine(string)Writes the specified message to appenders.

See Also