Update Program.cs to read Seq config from appsettings.json
This commit is contained in:
@@ -20,8 +20,8 @@ if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
|
||||
|
||||
var levelSwitch = new LoggingLevelSwitch();
|
||||
var logger = new LoggerConfiguration()
|
||||
.WriteTo.Seq("https://seq.afrino.co",
|
||||
apiKey: "qPxY2VEQwMfWMI8IX4Fq",
|
||||
.WriteTo.Seq(builder.Configuration["Seq:ServerUrl"] ?? "http://seq-svc:5341",
|
||||
apiKey: string.IsNullOrEmpty(builder.Configuration["Seq:ApiKey"]) ? null : builder.Configuration["Seq:ApiKey"],
|
||||
controlLevelSwitch: levelSwitch)
|
||||
.CreateLogger();
|
||||
builder.Logging.AddSerilog(logger);
|
||||
|
||||
Reference in New Issue
Block a user