Class ILoggerExtensions
This extension class shortens log method calls.
Inheritance
System.Object
ILoggerExtensions
Namespace: TeleScope.Logging.Metrics.Extensions
Assembly: TeleScope.Logging.Metrics.dll
Syntax
public static class ILoggerExtensions : object
Methods
| Improve this Doc View SourceMetrics(ILogger, LogLevel, Boolean, String, Object[])
Writes the metrics execution time
and total memory usage
to the logger.
Declaration
public static IDisposable Metrics(this ILogger logger, LogLevel level, bool forceGarbageCollection, string message, params object[] args)
Parameters
Type | Name | Description |
---|---|---|
ILogger | logger | The calling instance. |
LogLevel | level | The minimum log level for logging the metrics. |
System.Boolean | forceGarbageCollection | Determines if the |
System.String | message | The client-side message. |
System.Object[] | args | Optional data arguments that should appear in the message. |
Returns
Type | Description |
---|---|
IDisposable | The metrics instance as |
Metrics(ILogger, String)
Writes the metrics execution time
and total memory usage
to the logger.
The
Declaration
public static IDisposable Metrics(this ILogger logger, string message = "")
Parameters
Type | Name | Description |
---|---|---|
ILogger | logger | The calling instance. |
System.String | message | The client-side message that contains the calling member name.
If not present the message will only contain the name of the calling member |
Returns
Type | Description |
---|---|
IDisposable | The metrics instance as |