Skip to content

Commit 86ba618

Browse files
committed
LogManager.Use suppressions
1 parent 49d6c73 commit 86ba618

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

src/ServiceControl.Infrastructure/LoggingConfigurator.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@ public static class LoggingConfigurator
1616
{
1717
public static void ConfigureLogging(LoggingSettings loggingSettings)
1818
{
19-
//used for loggers outside of ServiceControl (i.e. transports and core) to use the logger factory defined here
19+
//used for loggers outside ServiceControl (i.e. transports and core) to use the logger factory defined here
20+
#pragma warning disable CS0618 // Type or member is obsolete
2021
LogManager.UseFactory(new ExtensionsLoggerFactory(LoggerFactory.Create(configure => configure.ConfigureLogging(loggingSettings.LogLevel))));
22+
#pragma warning restore CS0618 // Type or member is obsolete
2123

2224
if (!LoggerUtil.IsLoggingTo(Loggers.NLog) || NLog.LogManager.Configuration != null)
2325
{

src/ServiceControl.Transports.Tests/TransportTestFixture.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ abstract class TransportTestFixture
3030
public virtual async Task Setup()
3131
{
3232
//used for loggers outside ServiceControl (i.e. transports and core) to use the logger factory defined here
33+
#pragma warning disable CS0618 // Type or member is obsolete
3334
LogManager.UseFactory(new ExtensionsLoggerFactory(new TestContextAppenderFactory(Microsoft.Extensions.Logging.LogLevel.Warning)));
35+
#pragma warning restore CS0618 // Type or member is obsolete
3436
LoggerUtil.ActiveLoggers = Loggers.Test;
3537
configuration = new TransportTestsConfiguration();
3638
testCancellationTokenSource = Debugger.IsAttached ? new CancellationTokenSource() : new CancellationTokenSource(TestTimeout);

0 commit comments

Comments
 (0)