Logger library for C#.
The library "logger.dll" is a library to output log message, informaiton into console and/or file in C# applications.
To use this library, clone the repository and add reference to the file Logger.dll in the cloned into your project. And then, setup logger in your codes called when starts.
Sample codes:
using CS.Logger;
CS.Logger.ALog consoleLogger = new CS.Logger.Console.Log();
CS.Logger.Log.AddLogger(consoleLogger);
CS.Logger.Log.TRACE("Sample TRACE level log message");
CS.Logger.Log.DEBUG("Sample DEBUG level log message");
CS.Logger.Log.INFO("Sample INFO(rmation) level log message");
CS.Logger.Log.WARN("Sample WARN(ing) level log message");
CS.Logger.Log.ERROR("Sample ERROR level log message");
CS.Logger.Log.FATAL("Sample FATAL level log message");
Codes Log.Addogger
is a method the logger.dll provides, Logger.Console.Log
, and Logger.File.Log
are class to output log message into console and file.
The codes above output message into console like below:
And the same message will be output into a file like below:
sample_log_file.log
File name is yyyyMMddHHmmss
format.
It can change. The way to change, see wiki pages.