diff --git a/src/MySqlConnector.Logging.Microsoft.Extensions.Logging/MySqlConnectorLoggingExtensions.cs b/src/MySqlConnector.Logging.Microsoft.Extensions.Logging/MySqlConnectorLoggingExtensions.cs index 98c90db85..b5c59efe0 100644 --- a/src/MySqlConnector.Logging.Microsoft.Extensions.Logging/MySqlConnectorLoggingExtensions.cs +++ b/src/MySqlConnector.Logging.Microsoft.Extensions.Logging/MySqlConnectorLoggingExtensions.cs @@ -5,6 +5,7 @@ namespace MySqlConnector.Logging; public static class MySqlConnectorLoggingExtensions { + [Obsolete("Use UseLoggerFactory or AddMySqlDataSource instead. See https://mysqlconnector.net/diagnostics/logging/.")] public static IServiceProvider UseMySqlConnectorLogging(this IServiceProvider services) { var loggerFactory = (ILoggerFactory) services.GetService(typeof(ILoggerFactory)); diff --git a/src/MySqlConnector/Logging/MySqlConnectorLogManager.cs b/src/MySqlConnector/Logging/MySqlConnectorLogManager.cs index da0ce1963..6f02b4f5e 100644 --- a/src/MySqlConnector/Logging/MySqlConnectorLogManager.cs +++ b/src/MySqlConnector/Logging/MySqlConnectorLogManager.cs @@ -12,6 +12,7 @@ public static class MySqlConnectorLogManager /// be set once, and must be set before any other library methods are used. /// #pragma warning disable CA1044 // Properties should not be write only + [Obsolete("Use UseLoggerFactory or AddMySqlDataSource instead. See https://mysqlconnector.net/diagnostics/logging/.")] public static IMySqlConnectorLoggerProvider Provider { set