From 0bd4e77e9df5145891837f8f2da74a02663bca7f Mon Sep 17 00:00:00 2001 From: Flaminel Date: Wed, 21 May 2025 20:49:40 +0300 Subject: [PATCH] #31 --- code/Infrastructure/Logging/LoggingInitializer.cs | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) 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 } }