Skip to content

Commit

Permalink
Make LogManager.Provider [Obsolete]. Fixes #1397
Browse files Browse the repository at this point in the history
  • Loading branch information
bgrainger committed Nov 5, 2024
1 parent 21c07f6 commit 5eb1bf1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
1 change: 1 addition & 0 deletions src/MySqlConnector/Logging/MySqlConnectorLogManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ public static class MySqlConnectorLogManager
/// be set once, and must be set before any other library methods are used.
/// </summary>
#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
Expand Down

0 comments on commit 5eb1bf1

Please sign in to comment.