Class CommandLoggingExtensions
Extensions for logging commands.
Inheritance
System.Object
CommandLoggingExtensions
Namespace: TehGM.Wolfringo.Commands
Assembly: Wolfringo.Commands.dll
Syntax
public static class CommandLoggingExtensions
Methods
| Improve this Doc View SourceBeginCommandScope(ILogger, ICommandContext, Object, String)
Creates a log scope for command context.
Declaration
public static IDisposable BeginCommandScope(this ILogger log, ICommandContext context, object handler = null, string methodName = null)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.Extensions.Logging.ILogger | log | Logger. |
ICommandContext | context | Command context to create scope for. |
System.Object | handler | Handler to use in scope arguments. |
System.String | methodName | Name of the method creating the scope. |
Returns
Type | Description |
---|---|
System.IDisposable | Log scope. |
BeginCommandScope(ILogger, ICommandContext, Type, String)
Creates a log scope for command context.
Declaration
public static IDisposable BeginCommandScope(this ILogger log, ICommandContext context, Type handlerType = null, string methodName = null)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.Extensions.Logging.ILogger | log | Logger. |
ICommandContext | context | Command context to create scope for. |
System.Type | handlerType | Handler to use in scope arguments. |
System.String | methodName | Name of the method creating the scope. |
Returns
Type | Description |
---|---|
System.IDisposable | Log scope. |