API Reference
Class
LogLevels
Log levels for log regions and Write-ConsoleLog: info, warn, err, verbose, debug, pass and skip. PowerShell's own words (Information, Warning, Error, Verbose, Debug, Success...) and the status words map onto them, so one vocabulary works for statuses and logs.
Inheritance
- Object
- LogLevels
Methods
public static StatusKind? ToStatus(String? level) #Returns:
StatusKind?The status a level is marked with (err → Fail, warn → Warn, pass → Pass, skip → Skip), or null for info, verbose and debug.
Parameters
- level System.String?
- A level or status word.
Returns
The status, or null.
public static Boolean TryNormalize(String? text, out String level) #Returns:
BooleanMaps a level or status word to a canonical level name.
Parameters
- text System.String?
- The word (case does not matter).
- level System.String
- The canonical level.
Returns
Whether the word was recognised.
Inherited Methods
public virtual Boolean Equals(Object? obj) #Returns:
BooleanInherited from Object
Parameters
- obj Object?
Properties
public static IReadOnlyList<String> Words { get; } #The words LogLevels.TryNormalize accepts, for argument completion.