-
-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
98 additions
and
462 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
74 changes: 0 additions & 74 deletions
74
src/FirebirdSql.Data.FirebirdClient/Logging/ConsoleLoggingProvider.cs
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,37 +15,26 @@ | |
|
||
//$Authors = Jiri Cincura ([email protected]) | ||
|
||
using System; | ||
using Microsoft.Extensions.Logging.Abstractions; | ||
using Microsoft.Extensions.Logging; | ||
|
||
namespace FirebirdSql.Data.Logging; | ||
|
||
public static class FbLogManager | ||
{ | ||
public static IFbLoggingProvider Provider | ||
{ | ||
get | ||
{ | ||
_providerRetrieved = true; | ||
return _provider; | ||
} | ||
set | ||
{ | ||
if (_providerRetrieved) | ||
throw new InvalidOperationException("The logging provider must be set before any action is taken"); | ||
internal static ILoggerFactory LoggerFactory = NullLoggerFactory.Instance; | ||
internal static bool IsParameterLoggingEnabled = false; | ||
|
||
_provider = value ?? throw new ArgumentNullException(nameof(value)); | ||
} | ||
public static void UseLoggerFactory(ILoggerFactory loggerFactory) | ||
{ | ||
LoggerFactory = loggerFactory; | ||
} | ||
|
||
public static bool IsParameterLoggingEnabled { get; set; } | ||
|
||
static IFbLoggingProvider _provider; | ||
static bool _providerRetrieved; | ||
|
||
static FbLogManager() | ||
public static void EnableParameterLogging(bool enable = true) | ||
{ | ||
_provider = new NullLoggingProvider(); | ||
IsParameterLoggingEnabled = enable; | ||
} | ||
|
||
internal static IFbLogger CreateLogger(string name) => Provider.CreateLogger("FirebirdClient." + name); | ||
internal static ILogger<T> CreateLogger<T>() => | ||
LoggerFactory.CreateLogger<T>(); | ||
} |
This file was deleted.
Oops, something went wrong.
23 changes: 0 additions & 23 deletions
23
src/FirebirdSql.Data.FirebirdClient/Logging/IFbLoggingProvider.cs
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.