PlanTempusApp/Core/ModuleRegistry/SeqLoggingModule.cs

32 lines
885 B
C#
Raw Normal View History

using Autofac;
2025-03-10 15:56:22 +01:00
using PlanTempus.Core.SeqLogging;
namespace PlanTempus.Core.ModuleRegistry
{
public class SeqLoggingModule : Module
{
public required SeqConfiguration SeqConfiguration { get; set; }
protected override void Load(ContainerBuilder builder)
{
//builder.RegisterType<MessageChannel>()
// .As<IMessageChannel<Microsoft.ApplicationInsights.Channel.ITelemetry>>()
// .SingleInstance();
builder.RegisterType<SeqBackgroundService>()
//.As<Microsoft.Extensions.Hosting.IHostedService>()
.SingleInstance();
builder.RegisterGeneric(typeof(SeqLogger<>));
builder.RegisterInstance(SeqConfiguration);
builder.RegisterType<SeqHttpClient>()
.As<SeqHttpClient>()
.SingleInstance();
2025-02-20 17:14:53 +01:00
}
}
}