feat: improve logging
This commit is contained in:
@ -65,7 +65,10 @@ public static class LoggerConfiguration
|
||||
return app.Use(async (context, next) =>
|
||||
{
|
||||
var traceId = Activity.Current?.Id ?? context.TraceIdentifier;
|
||||
|
||||
using (LogContext.PushProperty("TraceId", traceId))
|
||||
using (LogContext.PushProperty("UserAgent", context.Request.Headers.UserAgent.ToString()))
|
||||
using (LogContext.PushProperty("RemoteIPAddress", context.Connection.RemoteIpAddress?.ToString()))
|
||||
{
|
||||
await next();
|
||||
}
|
||||
|
Reference in New Issue
Block a user