This commit is contained in:
14
README.md
14
README.md
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
A minimal, highly-portable, thread-safe .NET logging abstraction and implementation. Use `portaloggy.ILogger` everywhere. Make use of `portaloggy.LoggerExtensions` to make easy logging even easier. Already contains `ConsoleLogger` for dead-simple console logging and `AggregatedLogger` for simultaneous logging to multiple instances of `ILogger`.
|
A minimal, highly-portable, thread-safe .NET logging abstraction and implementation. Use `portaloggy.ILogger` everywhere. Make use of `portaloggy.LoggerExtensions` to make easy logging even easier. Already contains `ConsoleLogger` for dead-simple console logging and `AggregatedLogger` for simultaneous logging to multiple instances of `ILogger`.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
## Why
|
## Why
|
||||||
|
|
||||||
@ -10,8 +10,16 @@ Existing logging solutions were too complicated for me. I want something I just
|
|||||||
|
|
||||||
## How to use
|
## How to use
|
||||||
|
|
||||||
`var logger = new ConsoleLogger();` it's literally this simple. It will straight up start logging (pretty) messages to console, with accurate time, severity, message and even exception formatting and stacktrace if you provide the arguments.
|
Add nuget resource to Visual Studio, install the package and write `var logger = new ConsoleLogger();` it's literally this simple. It will straight up start logging (pretty) messages to console, with accurate time, severity, message and even exception formatting and stacktrace if you provide the arguments.
|
||||||
|
|
||||||
|
You are free to provide additional implementations for `ILogger` interface, i.e. Serilog, log4net or others. Portaloggy, however, maintains absolutely minimal footprint in your assemblies, doesn't require generic instantiation and yet figures out Exception stacks all the same. It's just dead simple to use everywhere and wire existing, bulky, complicated logging solutions only at bootstrap.
|
||||||
|
|
||||||
|
### NuGet source
|
||||||
|
|
||||||
|
`https://gitea.masita.net/api/packages/mc/nuget/index.json`
|
||||||
|
|
||||||
|
You must provide login credentials.
|
||||||
|
|
||||||
## How it works
|
## How it works
|
||||||
|
|
||||||
See `ILogger` interface. It's really simple. Use extensions to provide friendlier use for usual usecases separated by severity (`Warning()`, `Error()`, etc.).
|
See `ILogger` interface. It's really simple. Use [extensions](https://gitea.masita.net/mc/portaloggy/src/commit/9cbb6488d2ca1a71877902ca51b056c93eb81ffc/code/portaloggy/LoggerExtensions.cs) to provide friendlier use for usual usecases separated by severity (`Warning()`, `Error()`, etc.).
|
||||||
Reference in New Issue
Block a user