2020-11-01 13:01:06 +00:00
# Log4Sharp
Dead-simple colorful logger for C#/.NET Core.
2020-11-09 08:54:51 +00:00
I have not found any simple loggers in the .NET Core ecosystem that are not framework-specific and have easy usage, so I decided to write this one. Mostly inspired by various Golang loggers.
2020-11-01 13:01:06 +00:00
2020-11-09 08:52:20 +00:00
![](./assets/log.png)
2020-11-01 13:01:06 +00:00
## Install
```
dotnet add package Log4Sharp
```
## Usage
```c#
using Log4Sharp;
...
2020-11-09 08:52:20 +00:00
Log.Debug("Hello World!");
2020-11-01 13:01:06 +00:00
Log.Info("Hello World!");
2020-11-09 08:52:20 +00:00
Log.Warning("Hello World!");
Log.Error("Hello World!");
Log.Fatal("Hello World!");
```
You can also change log level output filter (by default it's set to `LogLevel.Error` ):
```c#
Log.SetLogLevel(LogLevel.Debug); // Allow output of all log levels
2020-11-01 13:01:06 +00:00
```
## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
## License
MIT © ChronosX88