C# Class NetworkCommsDotNet.Tools.LiteLogger

A core logger that can be used to write log messages to the console and or a log file.
Inheritance: ILogger
ファイルを表示 Open project: MarcFletcher/NetworkComms.Net Class Usage Examples

Public Methods

Method Description
Debug ( string message ) : void
Error ( string message ) : void
Fatal ( string message ) : void
Fatal ( string message, Exception ex ) : void
Info ( string message ) : void
LiteLogger ( LogMode logMode ) : System

Initialise an instance of the core logger. If logging to a file also set LogFileLocationName.

LiteLogger ( LogMode logMode, string logFileLocationName ) : System

Initialise an instance of the core logger

Shutdown ( ) : void
Trace ( string message ) : void
Warn ( string message ) : void

Private Methods

Method Description
log ( string level, string message ) : void

Method Details

Debug() public method

public Debug ( string message ) : void
message string
return void

Error() public method

public Error ( string message ) : void
message string
return void

Fatal() public method

public Fatal ( string message ) : void
message string
return void

Fatal() public method

public Fatal ( string message, Exception ex ) : void
message string
ex System.Exception
return void

Info() public method

public Info ( string message ) : void
message string
return void

LiteLogger() public method

Initialise an instance of the core logger. If logging to a file also set LogFileLocationName.
public LiteLogger ( LogMode logMode ) : System
logMode LogMode The log mode to use
return System

LiteLogger() public method

Initialise an instance of the core logger
public LiteLogger ( LogMode logMode, string logFileLocationName ) : System
logMode LogMode The log mode to use
logFileLocationName string The log file location and name, i.e. logs/logFile.txt
return System

Shutdown() public method

public Shutdown ( ) : void
return void

Trace() public method

public Trace ( string message ) : void
message string
return void

Warn() public method

public Warn ( string message ) : void
message string
return void