Skip to content

CountrySideEngineer/Logger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Logger

LICENSE APP_VER DOT_NET_CORE DOT_NET_CORE DOT_NET_FRAMEWORK OS

Logger library for C#.

What?

The library "logger.dll" is a library to output log message, informaiton into console and/or file in C# applications.

How to use

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:

sample_screen_shotpng

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.

About

Log library for C#.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages