Table of Contents

Class Logger

Namespace
TCSystem.Logging
Assembly
TCSystem.Logging.dll

Defines logging operations for the configured targets.

public abstract class Logger
Inheritance
Logger
Inherited Members

Remarks

This is an abstract class so debug calls can use conditional compilation.

Properties

IsDebugEnabled

Gets whether debug-level logging is enabled.

public abstract bool IsDebugEnabled { get; }

Property Value

bool

IsErrorEnabled

Gets whether error-level logging is enabled.

public abstract bool IsErrorEnabled { get; }

Property Value

bool

IsFatalEnabled

Gets whether fatal-level logging is enabled.

public abstract bool IsFatalEnabled { get; }

Property Value

bool

IsInfoEnabled

Gets whether information-level logging is enabled.

public abstract bool IsInfoEnabled { get; }

Property Value

bool

IsWarnEnabled

Gets whether warning-level logging is enabled.

public abstract bool IsWarnEnabled { get; }

Property Value

bool

Methods

Debug(string)

Writes a debug-level message when the caller is compiled with DEBUG.

[Conditional("DEBUG")]
public abstract void Debug(string message)

Parameters

message string

The message to write.

Debug(string, Exception)

Writes a debug-level message and exception when the caller is compiled with DEBUG.

[Conditional("DEBUG")]
public abstract void Debug(string message, Exception exception)

Parameters

message string

The message to write.

exception Exception

The associated exception.

Error(string)

Writes an error-level message.

public abstract void Error(string message)

Parameters

message string

The message to write.

Error(string, Exception)

Writes an error-level message and exception.

public abstract void Error(string message, Exception exception)

Parameters

message string

The message to write.

exception Exception

The associated exception.

Fatal(string)

Writes a fatal-level message.

public abstract void Fatal(string message)

Parameters

message string

The message to write.

Fatal(string, Exception)

Writes a fatal-level message and exception.

public abstract void Fatal(string message, Exception exception)

Parameters

message string

The message to write.

exception Exception

The associated exception.

Info(string)

Writes an information-level message.

public abstract void Info(string message)

Parameters

message string

The message to write.

Info(string, Exception)

Writes an information-level message and exception.

public abstract void Info(string message, Exception exception)

Parameters

message string

The message to write.

exception Exception

The associated exception.

Warn(string)

Writes a warning-level message.

public abstract void Warn(string message)

Parameters

message string

The message to write.

Warn(string, Exception)

Writes a warning-level message and exception.

public abstract void Warn(string message, Exception exception)

Parameters

message string

The message to write.

exception Exception

The associated exception.