Skip to content
ConsoleMonster

API Reference

Class

LogTags

Namespace ConsoleMonster.Widgets
Assembly ConsoleMonster
Modifiers static

How log levels look in ConsoleMonster (the log region, Write-ConsoleLog, the logging provider of ConsoleMonster.Extensions.Logging): the tag word with a status marker when glyphs allow ("✗ ERR", "▴ WARN", "✓ OK"), its style, and which levels are quiet (verbose and debug text is muted).

Inheritance

  • Object
  • LogTags

Methods

public static Boolean IsQuiet(String level) #
Returns: Boolean

Whether text at a level is shown muted (verbose and debug).

Parameters

level System.String requiredposition: 0
A normalized level.

Returns

True for quiet levels.

public static String Normalize(String? level) #
Returns: String

The level as one of LogLevels.Names (info, warn, err, verbose, debug, pass, skip); unknown words are info.

Parameters

level System.String? requiredposition: 0
A level name or one of PowerShell's words.

Returns

The normalized level.

public static Style Style(String level, RenderContext context) #
Returns: Style

The tag's style: failure, warning or pass colours; muted for the rest.

Parameters

level System.String requiredposition: 0
A normalized level.
context ConsoleMonster.Canvas.RenderContext requiredposition: 1
The render context.

Returns

The style.

public static String Tag(String level, RenderContext? context = null) #
Returns: String

The level column's text: the tag word, with the status marker in front when the context's glyphs allow; empty for info.

Parameters

level System.String requiredposition: 0
A normalized level.
context ConsoleMonster.Canvas.RenderContext? = null optionalposition: 1
The render context, or null for the word alone (narrated lines).

Returns

The tag.