Class
LogLevels
ConsoleMonster.Styling
Log levels for log regions and Write-ConsoleLogEntry: info, warn, err, critical, 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) #The status a level is marked with (critical and err → Fail, warn → Warn, pass → Pass, skip → Skip), or null for info, verbose and debug.
Parameters
- level string?
- A level or status word.
public static bool TryNormalize(string? text, out string level) #Maps a level or status word to a canonical level name.
Parameters
- text string?
- The word (case does not matter).
- level string
- The canonical level.
Returns
bool Whether the word was recognised.Inherited Methods
Properties
public static IReadOnlyList<string> Words { get; } #The words LogLevels.TryNormalize accepts, for argument completion.