Design Pattern Examples
Overview of object-oriented design patterns
NullLogger Class Reference

Represents a logger that throws away anything sent its way. More...

Inheritance diagram for NullLogger:
Inheritance graph
Collaboration diagram for NullLogger:
Collaboration graph

Static Public Member Functions

static ILogger CreateNullLogger ()
 Create an instance of a null logger, a logger that doesn't do anything.
 

Private Member Functions

 NullLogger ()
 Constructor.
 
void ILogger. LogTrace (string msg)
 Log trace messages to the configured output.
 
void ILogger. LogInfo (string msg)
 Log informational messages to the configured output.
 
void ILogger. LogError (string msg)
 Log error messages to the configured output.
 
void IDisposable. Dispose ()
 Nothing to do for a graceful shutdown.
 

Additional Inherited Members

void LogTrace (string msg)
 Log trace messages to the configured output.
 
void LogInfo (string msg)
 Log informational messages to the configured output.
 
void LogError (string msg)
 Log error messages to the configured output.
 

Detailed Description

Represents a logger that throws away anything sent its way.

Definition at line 13 of file Bridge_NullLogger.cs.

Constructor & Destructor Documentation

◆ NullLogger()

NullLogger ( )
inlineprivate

Constructor.

Definition at line 18 of file Bridge_NullLogger.cs.

Referenced by NullLogger.CreateNullLogger().

Member Function Documentation

◆ CreateNullLogger()

static ILogger CreateNullLogger ( )
inlinestatic

Create an instance of a null logger, a logger that doesn't do anything.

Returns
An instance of an ILogger object.

Definition at line 55 of file Bridge_NullLogger.cs.

References NullLogger.NullLogger().

Referenced by Logger.Logger().

◆ Dispose()

void IDisposable. Dispose ( )
inlineprivate

Nothing to do for a graceful shutdown.

Definition at line 44 of file Bridge_NullLogger.cs.

◆ LogError()

void ILogger. LogError ( string  msg)
inlineprivate

Log error messages to the configured output.

Parameters
msgThe message to log.

Implements ILogger.

Definition at line 33 of file Bridge_NullLogger.cs.

◆ LogInfo()

void ILogger. LogInfo ( string  msg)
inlineprivate

Log informational messages to the configured output.

Parameters
msgThe message to log.

Implements ILogger.

Definition at line 29 of file Bridge_NullLogger.cs.

◆ LogTrace()

void ILogger. LogTrace ( string  msg)
inlineprivate

Log trace messages to the configured output.

Parameters
msgThe message to log.

Implements ILogger.

Definition at line 25 of file Bridge_NullLogger.cs.


The documentation for this class was generated from the following file: