Method PushLogger
PushLogger(ILogger)
Pushes a logger into ambient async context. Dispose the returned scope to restore the previous logger for the current async flow.
public static IDisposable PushLogger(ILogger logger)
Parameters
loggerILoggerThe logger to route Terminal.Gui logs to for the current scope.
Returns
- IDisposable
An IDisposable scope that restores the previous logger when disposed.