Table of Contents

Class VerbosityOption

Namespace
Albatross.CommandLine
Assembly
Albatross.CommandLine.dll

A command-line option for controlling logging verbosity level. Supports case-insensitive prefix matching (e.g., "v" matches "Verbose", "d" matches "Debug").

public class VerbosityOption : Option<string>
Inheritance
VerbosityOption
Inherited Members

Constructors

VerbosityOption()

Creates a new verbosity option with aliases --verbosity and -v. Defaults to Error level.

public VerbosityOption()

Fields

Critical

Maps to Critical.

public const string Critical = "Critical"

Field Value

string

Debug

Maps to Debug.

public const string Debug = "Debug"

Field Value

string

Error

Maps to Error.

public const string Error = "Error"

Field Value

string

Info

Maps to Information.

public const string Info = "Info"

Field Value

string

None

Maps to None.

public const string None = "None"

Field Value

string

Verbose

Maps to Trace.

public const string Verbose = "Verbose"

Field Value

string

Warning

Maps to Warning.

public const string Warning = "Warning"

Field Value

string

Methods

GetLogLevel(ParseResult)

Converts the verbosity option value from the parse result to a LogLevel.

public LogLevel GetLogLevel(ParseResult result)

Parameters

result ParseResult

The parse result containing the option value.

Returns

LogLevel

The corresponding log level, or Error if parsing failed.