ConfigurationConsoleLoggerSettings.TryGetSwitch(String, LogLevel) Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Obtient le niveau de journal pour le commutateur spécifié.
public:
virtual bool TryGetSwitch(System::String ^ name, [Runtime::InteropServices::Out] Microsoft::Extensions::Logging::LogLevel % level);
public bool TryGetSwitch(string name, out Microsoft.Extensions.Logging.LogLevel level);
abstract member TryGetSwitch : string * LogLevel -> bool
override this.TryGetSwitch : string * LogLevel -> bool
Public Function TryGetSwitch (name As String, ByRef level As LogLevel) As Boolean
Paramètres
- name
- String
Nom du commutateur à rechercher.
- level
- LogLevel
Lorsque cette méthode est retournée, contient la valeur du commutateur s’il est trouvé. Si le commutateur est introuvable, la méthode retourne false et définit la valeur de niveau sur LogLevel.None.
Retours
true si le commutateur a été trouvé, sinon false.