LinkMenuExpand(external link)DocumentSearchCopyCopied

IMySqlConnectorLogger.Log method

Writes a log message to the target.

public void Log(MySqlConnectorLogLevel level, string message, object?[]? args = null, 
    Exception? exception = null)
parameterdescription
levelThe log level.
messageThe log message. See documentation for args for notes on interpreting {0} within this string.
argsIf 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.
exceptionIf 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