IMySqlConnectorLogger.Log method
Writes a log message to the target.
public void Log(MySqlConnectorLogLevel level, string message, object?[]? args = null,
Exception? exception = null)
| parameter | description |
|---|---|
| level | The log level. |
| message | The log message. See documentation for args for notes on interpreting {0} within this string. |
| args | If not null or empty, then message includes formatting placeholders (e.g., {0}) which must be replaced with the arguments in args, using Object[]) or similar. If null or an empty array, then message is a literal string; any curly braces within it must be treated as literal characters, not formatting placeholders. |
| exception | If not null, an Exception associated with the log message. |
Remarks
This method may be called from multiple threads and must be thread-safe. This method may be called even if IsEnabled would return false for level; the implementation must check if logging is enabled for that level.
See Also
- enum MySqlConnectorLogLevel
- interface IMySqlConnectorLogger
- namespace MySqlConnector.Logging
- assembly MySqlConnector