Serilog Db Logging issue with middleware ASP.NET Core Web API
namespace FraudPortalService.Shared.Logging { public class FraudPortalLogReqRespTraceMiddleware1 { private readonly ILogger<FraudPortalLogReqRespTraceMiddleware> _logger; private readonly Stopwatch _watch = new Stopwatch(); private readonly RequestDelegate _next; private readonly RecyclableMemoryStreamManager _recyclableMemoryStreamManager; private static bool _allowReqRespLog; internal ServiceLogDTO log { get; set; } public static LoggerConfiguration ConfigLog(ref LoggerConfiguration loggerConfiguration, IConfiguration config) { var columnOptions = new ColumnOptions { AdditionalColumns = new […]
Serilog Db Logging issue with middleware ASP.NET Core Web API
namespace FraudPortalService.Shared.Logging { public class FraudPortalLogReqRespTraceMiddleware1 { private readonly ILogger<FraudPortalLogReqRespTraceMiddleware> _logger; private readonly Stopwatch _watch = new Stopwatch(); private readonly RequestDelegate _next; private readonly RecyclableMemoryStreamManager _recyclableMemoryStreamManager; private static bool _allowReqRespLog; internal ServiceLogDTO log { get; set; } public static LoggerConfiguration ConfigLog(ref LoggerConfiguration loggerConfiguration, IConfiguration config) { var columnOptions = new ColumnOptions { AdditionalColumns = new […]
Serilog Db Logging issue with middleware ASP.NET Core Web API
namespace FraudPortalService.Shared.Logging { public class FraudPortalLogReqRespTraceMiddleware1 { private readonly ILogger<FraudPortalLogReqRespTraceMiddleware> _logger; private readonly Stopwatch _watch = new Stopwatch(); private readonly RequestDelegate _next; private readonly RecyclableMemoryStreamManager _recyclableMemoryStreamManager; private static bool _allowReqRespLog; internal ServiceLogDTO log { get; set; } public static LoggerConfiguration ConfigLog(ref LoggerConfiguration loggerConfiguration, IConfiguration config) { var columnOptions = new ColumnOptions { AdditionalColumns = new […]
Serilog Db Logging issue with middleware .net core api
namespace FraudPortalService.Shared.Logging { public class FraudPortalLogReqRespTraceMiddleware1 { private readonly ILogger<FraudPortalLogReqRespTraceMiddleware> _logger; private readonly Stopwatch _watch = new Stopwatch(); private readonly RequestDelegate _next; private readonly RecyclableMemoryStreamManager _recyclableMemoryStreamManager; private static bool _allowReqRespLog; internal ServiceLogDTO log { get; set; } public static LoggerConfiguration ConfigLog(ref LoggerConfiguration loggerConfiguration, IConfiguration config) { var columnOptions = new ColumnOptions { AdditionalColumns = new […]
serilog configuration in .net core
I am trying to configure serilog and was just testing if it works, but I am getting error
UseSerilog with WebHost in .NET 8
I have my host initialized as below for a .NET 8 ASP.NET Core service