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;
|
||||||
using Newsbot.Collector.Domain.Models.Config;
|
using Newsbot.Collector.Domain.Models.Config;
|
||||||
using Serilog;
|
using Serilog;
|
||||||
|
using Serilog.Events;
|
||||||
using ILogger = Serilog.ILogger;
|
using ILogger = Serilog.ILogger;
|
||||||
|
|
||||||
var builder = WebApplication.CreateBuilder(args);
|
var builder = WebApplication.CreateBuilder(args);
|
||||||
@ -83,14 +83,17 @@ static ILogger GetLogger(IConfiguration configuration)
|
|||||||
if (otel == "")
|
if (otel == "")
|
||||||
return Log.Logger = new LoggerConfiguration()
|
return Log.Logger = new LoggerConfiguration()
|
||||||
.WriteTo.Console()
|
.WriteTo.Console()
|
||||||
|
.MinimumLevel.Debug()
|
||||||
.CreateLogger();
|
.CreateLogger();
|
||||||
|
|
||||||
return Log.Logger = new LoggerConfiguration()
|
return Log.Logger = new LoggerConfiguration()
|
||||||
.WriteTo.Console()
|
.WriteTo.Console()
|
||||||
|
.MinimumLevel.Debug()
|
||||||
.WriteTo.OpenTelemetry(
|
.WriteTo.OpenTelemetry(
|
||||||
otel,
|
otel,
|
||||||
resourceAttributes: new Dictionary<string, object>
|
resourceAttributes: new Dictionary<string, object>
|
||||||
{
|
{
|
||||||
|
{ "Application", "newsbot-collector-api"},
|
||||||
{ "service.name", "newsbot-collector-api" }
|
{ "service.name", "newsbot-collector-api" }
|
||||||
})
|
})
|
||||||
.CreateLogger();
|
.CreateLogger();
|
||||||
|
@ -2,6 +2,8 @@ namespace Newsbot.Collector.Domain.Consts;
|
|||||||
|
|
||||||
public class ConfigConst
|
public class ConfigConst
|
||||||
{
|
{
|
||||||
|
public const string LoggingDefault = "Logging:LogLevel:Default";
|
||||||
|
|
||||||
public const string SectionConnectionStrings = "ConnectionStrings";
|
public const string SectionConnectionStrings = "ConnectionStrings";
|
||||||
public const string SectionFinalFantasyXiv = "FinalFantasyXiv";
|
public const string SectionFinalFantasyXiv = "FinalFantasyXiv";
|
||||||
public const string SectionReddit = "Reddit";
|
public const string SectionReddit = "Reddit";
|
||||||
|
Loading…
Reference in New Issue
Block a user