Features/discord errors (#21)

* catching another http error code.

* more discord logging

* Setting min logging to debug for now.
This commit is contained in:
James Tombleson 2023-04-03 08:57:19 -07:00 committed by GitHub
parent af2f700e41
commit 33bf88d866
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View File

@ -7,7 +7,7 @@ using Newsbot.Collector.Domain.Consts;
using Newsbot.Collector.Domain.Models;
using Newsbot.Collector.Domain.Models.Config;
using Serilog;
using Serilog.Events;
using ILogger = Serilog.ILogger;
var builder = WebApplication.CreateBuilder(args);
@ -83,14 +83,17 @@ static ILogger GetLogger(IConfiguration configuration)
if (otel == "")
return Log.Logger = new LoggerConfiguration()
.WriteTo.Console()
.MinimumLevel.Debug()
.CreateLogger();
return Log.Logger = new LoggerConfiguration()
.WriteTo.Console()
.MinimumLevel.Debug()
.WriteTo.OpenTelemetry(
otel,
resourceAttributes: new Dictionary<string, object>
{
{ "Application", "newsbot-collector-api"},
{ "service.name", "newsbot-collector-api" }
})
.CreateLogger();

View File

@ -2,6 +2,8 @@ namespace Newsbot.Collector.Domain.Consts;
public class ConfigConst
{
public const string LoggingDefault = "Logging:LogLevel:Default";
public const string SectionConnectionStrings = "ConnectionStrings";
public const string SectionFinalFantasyXiv = "FinalFantasyXiv";
public const string SectionReddit = "Reddit";