mirror of
https://github.com/ChronosX88/log4sharp.git
synced 2024-11-25 01:42:18 +00:00
Add sample screenshot and more info to "Usage" section in README
This commit is contained in:
parent
81c2aff354
commit
c638970f66
12
README.md
12
README.md
@ -4,6 +4,8 @@ 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 logger. Mostly inspired by various Golang loggers.
|
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 logger. Mostly inspired by various Golang loggers.
|
||||||
|
|
||||||
|
![](./assets/log.png)
|
||||||
|
|
||||||
## Install
|
## Install
|
||||||
|
|
||||||
```
|
```
|
||||||
@ -15,7 +17,17 @@ dotnet add package Log4Sharp
|
|||||||
```c#
|
```c#
|
||||||
using Log4Sharp;
|
using Log4Sharp;
|
||||||
...
|
...
|
||||||
|
Log.Debug("Hello World!");
|
||||||
Log.Info("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
|
## Contributing
|
||||||
|
BIN
assets/log.png
Normal file
BIN
assets/log.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 32 KiB |
Loading…
Reference in New Issue
Block a user