public LogEventLevel SetMinimumLevel(LogEventLevel level) { var oldLevel = LevelSwitch.MinimumLevel; LevelSwitch.MinimumLevel = level; LogTo.Information($"Logging level changed from {oldLevel.Name()} to {level.Name()}"); return(oldLevel); }