https://github.com/benjaminabt/throwawaylogger
A very simple ILogging mock mechanism.
https://github.com/benjaminabt/throwawaylogger
benchmark logging unittests
Last synced: about 1 month ago
JSON representation
A very simple ILogging mock mechanism.
- Host: GitHub
- URL: https://github.com/benjaminabt/throwawaylogger
- Owner: BenjaminAbt
- License: mit
- Created: 2021-12-05T19:42:52.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-11-20T12:13:42.000Z (over 1 year ago)
- Last Synced: 2025-01-31T11:49:49.857Z (3 months ago)
- Topics: benchmark, logging, unittests
- Language: C#
- Homepage:
- Size: 24.4 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# ThrowAwayLogger
`ThrowAwayLogger` is an implementation of [`ILogger`](https://docs.microsoft.com/dotnet/core/extensions/custom-logging-provider?WT.mc_id=DT-MVP-5001507) as well as [`ILogger`](https://docs.microsoft.com/dotnet/core/extensions/custom-logging-provider?WT.mc_id=DT-MVP-5001507) which does nothing. Really: nothing.
Very handy for benchmarks or simple testing.
## NuGet
[BenjaminAbt.Extensions.Logger.ThrowAwayLogger](https://www.nuget.org/packages/BenjaminAbt.Extensions.Logger.ThrowAwayLogger/)
## Sample
```csharp
// field
private ILogger _log = new ThrowAwayLogger();// call
_log.Log(LogLevel.Information, _ex, "Test " + _message);
```Nothing happens ¯\_(ツ)_/¯