Features/discord errors (#21)
* catching another http error code. * more discord logging * Setting min logging to debug for now.
This commit is contained in:
parent
af2f700e41
commit
33bf88d866
@ -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();
|
||||
|
@ -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";
|
||||
|
Loading…
Reference in New Issue
Block a user