diff --git a/code/Infrastructure/Logging/LoggingInitializer.cs b/code/Infrastructure/Logging/LoggingInitializer.cs index 35bbad4e..08f76746 100644 --- a/code/Infrastructure/Logging/LoggingInitializer.cs +++ b/code/Infrastructure/Logging/LoggingInitializer.cs @@ -1,22 +1,15 @@ -using System.Collections; -using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; -using Serilog; namespace Infrastructure.Logging; -/// -/// A background service that initializes deferred logging components after startup -/// +// TODO remove public class LoggingInitializer : BackgroundService { - private readonly IServiceProvider _serviceProvider; private readonly ILogger _logger; - public LoggingInitializer(IServiceProvider serviceProvider, ILogger logger) + public LoggingInitializer(ILogger logger) { - _serviceProvider = serviceProvider; _logger = logger; } @@ -26,7 +19,7 @@ public class LoggingInitializer : BackgroundService { try { - throw new Exception("eroare e ceva ce multa lume n-are, ye"); + throw new Exception("test exception"); } catch (Exception exception) { @@ -35,7 +28,5 @@ public class LoggingInitializer : BackgroundService await Task.Delay(30000, stoppingToken); } - - // We only need to run this once at startup } }