NanoByte.Common  2.10.5
NanoByte.Common.Log Class Reference

Sends log messages to custom handlers or the console. Additionally writes to System.Diagnostics.Debug, an in-memory buffer and a plain text file. More...

Static Public Member Functions

static void Debug (string message)
 Writes information to help developers diagnose problems to the log. More...
 
static void Debug (Exception ex)
 Writes an exception as an Debug(string). More...
 
static void Info (string message)
 Writes nice-to-know information to the log. More...
 
static void Info (Exception ex)
 Writes an exception's message as a Info(string). More...
 
static void Warn (string message)
 Writes a warning that doesn't have to be acted upon immediately to the log. More...
 
static void Warn (Exception ex)
 Writes an exception's message as a Warn(string). More...
 
static void Error (string message)
 Writes a critical error that should be attended to to the log. More...
 
static void Error (Exception ex)
 Writes an exception's message as an Error(string). More...
 

Properties

static ? LogEntryEventHandler Handler
 Invoked when a new entry is added to the log. Only the newest (last) registered handler is invoked. Console output is used as a fallback if no handlers are registered. More...
 
static string Content [get]
 Collects all log entries from this application session. More...
 

Detailed Description

Sends log messages to custom handlers or the console. Additionally writes to System.Diagnostics.Debug, an in-memory buffer and a plain text file.

Member Function Documentation

◆ Debug() [1/2]

static void NanoByte.Common.Log.Debug ( Exception  ex)
inlinestatic

Writes an exception as an Debug(string).

◆ Debug() [2/2]

static void NanoByte.Common.Log.Debug ( string  message)
static

Writes information to help developers diagnose problems to the log.

◆ Error() [1/2]

static void NanoByte.Common.Log.Error ( Exception  ex)
inlinestatic

Writes an exception's message as an Error(string).

Also sends the entire exception to Debug(Exception).

◆ Error() [2/2]

static void NanoByte.Common.Log.Error ( string  message)
static

Writes a critical error that should be attended to to the log.

◆ Info() [1/2]

static void NanoByte.Common.Log.Info ( Exception  ex)
inlinestatic

Writes an exception's message as a Info(string).

Also sends the entire exception to Debug(Exception).

◆ Info() [2/2]

static void NanoByte.Common.Log.Info ( string  message)
static

Writes nice-to-know information to the log.

◆ Warn() [1/2]

static void NanoByte.Common.Log.Warn ( Exception  ex)
inlinestatic

Writes an exception's message as a Warn(string).

Also sends the entire exception to Debug(Exception).

◆ Warn() [2/2]

static void NanoByte.Common.Log.Warn ( string  message)
static

Writes a warning that doesn't have to be acted upon immediately to the log.

Property Documentation

◆ Content

string NanoByte.Common.Log.Content
staticget

Collects all log entries from this application session.

◆ Handler

? LogEntryEventHandler NanoByte.Common.Log.Handler
staticaddremove

Invoked when a new entry is added to the log. Only the newest (last) registered handler is invoked. Console output is used as a fallback if no handlers are registered.


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