Features/discord errors (#22)

* catching another http error code.

* more discord logging

* Setting min logging to debug for now.

* program logging is set to info but job logging is debug.
This commit is contained in:
James Tombleson 2023-04-03 09:31:00 -07:00 committed by GitHub
parent 33bf88d866
commit c0251e2485
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View File

@ -80,15 +80,16 @@ static ILogger GetLogger(IConfiguration configuration)
{ {
var otel = configuration.GetValue<string>(ConfigConnectionStringConst.OpenTelemetry) ?? ""; var otel = configuration.GetValue<string>(ConfigConnectionStringConst.OpenTelemetry) ?? "";
if (otel == "") if (otel == "")s
return Log.Logger = new LoggerConfiguration() return Log.Logger = new LoggerConfiguration()
.WriteTo.Console() .WriteTo.Console()
.MinimumLevel.Debug() .MinimumLevel.Information()
.CreateLogger(); .CreateLogger();
return Log.Logger = new LoggerConfiguration() return Log.Logger = new LoggerConfiguration()
.WriteTo.Console() .WriteTo.Console()
.MinimumLevel.Debug()
.MinimumLevel.Information()
.WriteTo.OpenTelemetry( .WriteTo.OpenTelemetry(
otel, otel,
resourceAttributes: new Dictionary<string, object> resourceAttributes: new Dictionary<string, object>

View File

@ -10,6 +10,7 @@ public static class JobLogger
return Log.Logger = new LoggerConfiguration().WriteTo.Console().CreateLogger(); return Log.Logger = new LoggerConfiguration().WriteTo.Console().CreateLogger();
return Log.Logger = new LoggerConfiguration() return Log.Logger = new LoggerConfiguration()
.WriteTo.Console() .WriteTo.Console()
.MinimumLevel.Debug()
.WriteTo.OpenTelemetry( .WriteTo.OpenTelemetry(
connectionString, connectionString,
resourceAttributes: new Dictionary<string, object> resourceAttributes: new Dictionary<string, object>