More work on SeqBackgroundService, next step is tests for it.

This commit is contained in:
Janus C. H. Knudsen 2025-02-18 16:23:08 +01:00
parent a139b1ad08
commit 67207cf90b
27 changed files with 237 additions and 190 deletions

View file

@ -1,9 +1,10 @@
using Autofac;
using Core.Logging;
using Core.Telemetry;
namespace Core.ModuleRegistry
{
public class SeqBackgroundServiceModule : Module
public class SeqLoggingModule : Module
{
protected override void Load(ContainerBuilder builder)
{
@ -15,6 +16,13 @@ namespace Core.ModuleRegistry
builder.RegisterType<SeqBackgroundService>()
.As<Microsoft.Extensions.Hosting.IHostedService>()
.SingleInstance();
builder.RegisterType<SeqHttpClient>()
.As<SeqHttpClient>()
.SingleInstance();
}
}
}

View file

@ -44,7 +44,7 @@ namespace Core.ModuleRegistry
var tmc = Microsoft.ApplicationInsights.Extensibility.TelemetryConfiguration.CreateDefault();
tmc.ConnectionString = TelemetryConfig.ConnectionString;
tmc.TelemetryChannel.DeveloperMode = true;
var channel = new Telemetry.DebugTelemetryChannel("C:\\logs\\telemetry.log");
var channel = new Telemetry.SeqLoggingTelemetryChannel("C:\\logs\\telemetry.log");
tmc.TelemetryChannel = channel;