https://github.com/ghost1face/beyondtech-extensions-logging
https://github.com/ghost1face/beyondtech-extensions-logging
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/ghost1face/beyondtech-extensions-logging
- Owner: ghost1face
- License: other
- Created: 2022-05-23T16:08:57.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2022-11-02T01:34:28.000Z (over 3 years ago)
- Last Synced: 2025-03-03T00:35:00.540Z (over 1 year ago)
- Language: C#
- Homepage:
- Size: 47.9 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# BeyondTech Logging Extensions
Extensions for Microsoft's `ILogger` for common use cases.
## BeyondTech.Extensions.Logging.Timing
[](https://github.com/ghost1face/beyondtech-extensions-logging/actions) [](https://coveralls.io/github/ghost1face/beyondtech-extensions-logging?branch=master)
[](https://www.nuget.org/packages/BeyondTech.Extensions.Logging.Timing)
Timing extensions for logging operations: [here](./src/BeyondTech.Extensions.Logging.Timing/README.md)
This lets you perfom simple logging for timed operations, while simplifying the boilerplate:
```cs
ILogger logger = // assign instance
using (var operation = logger.BeginOperation("Processing large file {FilePath}", filePath))
{
operation.Complete();
}
```
Yields:
```
info: Processing large file /d/test/image.png completed in 822.5 ms
```
### License
Licensed under [Apache 2.0](LICENSE.md)