ConfigurationConsoleLoggerSettings.TryGetSwitch(String, LogLevel) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the log level for the specified switch.
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
Parameters
- name
- String
The name of the switch to look up
- level
- LogLevel
An out parameter that will be set to the value of the switch if it is found. If the switch is not found, the method returns false and sets the value of level to LogLevel.None
Returns
True if the switch was found, otherwise false.
Implements
Exceptions
Applies to
Collaborer avec nous sur GitHub
La source de ce contenu se trouve sur GitHub, où vous pouvez également créer et examiner les problèmes et les demandes de tirage. Pour plus d’informations, consultez notre guide du contributeur.