thinktecture/relayserver

Consolidate logging

gingters opened this issue · 3 comments

Make logging similar to what is done in .NET:

One nested Log class with all [LoggerMessage] definitions on it. EventId is counted from 1 per logging class.
Logging class is either scoped per project or even per single class when there are a lot of messages.

Examples: See HttpConnectionDispatcher.Log and HttpConnectionManager.Log in SignalR Core.

Also, while at it, add a scope (ILogger.BeginScope) to all endpoints (RelayMiddleware, Body endpoint) that adds at least the RelayRequestId (see #402 ) to the scope.

That way, ASP.NET Core internal logs (i.e. also EF) will also add the corresponding RelayRequestId to the logging system.

We should also solve the todos regarding dotnet/runtime#69490 as this is fixed already.