Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chronosxyz/log4sharp
Dead-simple colorful logger for C#/.NET Core.
https://github.com/chronosxyz/log4sharp
Last synced: about 1 month ago
JSON representation
Dead-simple colorful logger for C#/.NET Core.
- Host: GitHub
- URL: https://github.com/chronosxyz/log4sharp
- Owner: ChronosXYZ
- License: mit
- Created: 2020-11-01T13:01:29.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2020-11-09T08:57:51.000Z (about 4 years ago)
- Last Synced: 2023-12-11T15:54:13.777Z (about 1 year ago)
- Language: C#
- Size: 38.1 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Log4Sharp
Dead-simple colorful logger for C#/.NET Core.
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.
![](./assets/log.png)
## Install
```
dotnet add package Log4Sharp
```## Usage
```c#
using Log4Sharp;
...
Log.Debug("Hello World!");
Log.Info("Hello World!");
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
```## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
## License
MIT © ChronosX88