Class DefaultLogger
Represents a default logger.
Inheritance
System.Object
DefaultLogger
Implements
Microsoft.Extensions.Logging.ILogger<BaseDiscordClient>
Microsoft.Extensions.Logging.ILogger
Namespace: DisCatSharp
Assembly: DisCatSharp.dll
Syntax
public class DefaultLogger : ILogger<BaseDiscordClient>, ILogger
Methods
| Improve this Doc View SourceBeginScope<TState>(TState)
Begins the scope.
Declaration
public IDisposable BeginScope<TState>(TState state)
Parameters
Type | Name | Description |
---|---|---|
TState | state | The state. |
Returns
Type | Description |
---|---|
System.IDisposable | An IDisposable. |
Type Parameters
Name | Description |
---|---|
TState |
IsEnabled(LogLevel)
Whether the logger is enabled.
Declaration
public bool IsEnabled(LogLevel logLevel)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.Extensions.Logging.LogLevel | logLevel | The log level. |
Returns
Type | Description |
---|---|
System.Boolean |
Log<TState>(LogLevel, EventId, TState, Exception, Func<TState, Exception, String>)
Logs an event.
Declaration
public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.Extensions.Logging.LogLevel | logLevel | The log level. |
Microsoft.Extensions.Logging.EventId | eventId | The event id. |
TState | state | The state. |
System.Exception | exception | The exception. |
System.Func<TState, System.Exception, System.String> | formatter | The formatter. |
Type Parameters
Name | Description |
---|---|
TState |
Implements
Microsoft.Extensions.Logging.ILogger<TCategoryName>
Microsoft.Extensions.Logging.ILogger