Interface IMySqlConnectorLogger
Implementations of IMySqlConnectorLogger write logs to a particular target.
Namespace: MySqlConnector.Logging
Assembly: Azos.MySql.dll
Syntax
public interface IMySqlConnectorLogger
Methods
IsEnabled(MySqlConnectorLogLevel)
Returns true
if logging for this logger is enabled at the specified level.
Declaration
bool IsEnabled(MySqlConnectorLogLevel level)
Parameters
Type | Name | Description |
---|---|---|
MySqlConnectorLogLevel | level | The log level. |
Returns
Type | Description |
---|---|
System.Boolean |
|
Log(MySqlConnectorLogLevel, String, Object[], Exception)
Writes a log message to the target.
Declaration
void Log(MySqlConnectorLogLevel level, string message, object[] args = null, Exception exception = null)
Parameters
Type | Name | Description |
---|---|---|
MySqlConnectorLogLevel | level | The log level. |
System.String | message | The log message. See documentation for |
System.Object[] | args | If not |
System.Exception | exception | If not |
Remarks
This method may be called from multiple threads and must be thread-safe. This method may be called
even if IsEnabled(MySqlConnectorLogLevel) would return false
for level
; the implementation must
check if logging is enabled for that level.