Skip to content

ghost1face/beyondtech-extensions-logging

Repository files navigation

BeyondTech Logging Extensions

Extensions for Microsoft's ILogger for common use cases.

BeyondTech.Extensions.Logging.Timing

.NET Actions Status Coverage Status Nuget

Timing extensions for logging operations: here

This lets you perfom simple logging for timed operations, while simplifying the boilerplate:

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