mason_logger library Null safety

Classes

AnsiCode
Standard ANSI escape code for customizing terminal text output.
AnsiCodeType
The type of code represented by AnsiCode.
ExitCode
Exit code constants.
Logger
A basic Logger which wraps stdio and applies various styles.
Progress
A class that can be used to display progress information to the user.
ProgressAnimation
An object which contains configuration for the animation of a Progress instance.
ProgressOptions
An object containing configuration for a Progress instance.

Constants

backgroundBlack → const AnsiCode
Background black
AnsiCode._('black', AnsiCodeType.background, 40, resetAll)
backgroundBlue → const AnsiCode
Background blue
AnsiCode._('blue', AnsiCodeType.background, 44, resetAll)
backgroundColors → const List<AnsiCode>
All of the AnsiCode values that represent AnsiCodeType.background.
[backgroundBlack, backgroundRed, backgroundGreen, backgroundYellow, backgroundBlue, backgroundMagenta, backgroundCyan, backgroundLightGray, backgroundDefault, backgroundDarkGray, backgroundLightRed, b…
backgroundCyan → const AnsiCode
Background cyan
AnsiCode._('cyan', AnsiCodeType.background, 46, resetAll)
backgroundDarkGray → const AnsiCode
Background dark gray
AnsiCode._('dark gray', AnsiCodeType.background, 100, resetAll)
backgroundDefault → const AnsiCode
Background default
AnsiCode._('default', AnsiCodeType.background, 49, resetAll)
backgroundGreen → const AnsiCode
Background green
AnsiCode._('green', AnsiCodeType.background, 42, resetAll)
backgroundLightBlue → const AnsiCode
Background light blue
AnsiCode._('light blue', AnsiCodeType.background, 104, resetAll)
backgroundLightCyan → const AnsiCode
Background light cyan
AnsiCode._('light cyan', AnsiCodeType.background, 106, resetAll)
backgroundLightGray → const AnsiCode
Background light gray
AnsiCode._('light gray', AnsiCodeType.background, 47, resetAll)
backgroundLightGreen → const AnsiCode
Background light green
AnsiCode._('light green', AnsiCodeType.background, 102, resetAll)
backgroundLightMagenta → const AnsiCode
Background light magenta
AnsiCode._('light magenta', AnsiCodeType.background, 105, resetAll)
backgroundLightRed → const AnsiCode
Background light red
AnsiCode._('light red', AnsiCodeType.background, 101, resetAll)
backgroundLightYellow → const AnsiCode
Background light yellow
AnsiCode._('light yellow', AnsiCodeType.background, 103, resetAll)
backgroundMagenta → const AnsiCode
Background magenta
AnsiCode._('magenta', AnsiCodeType.background, 45, resetAll)
backgroundRed → const AnsiCode
Background red
AnsiCode._('red', AnsiCodeType.background, 41, resetAll)
backgroundWhite → const AnsiCode
Background white
AnsiCode._('white', AnsiCodeType.background, 107, resetAll)
backgroundYellow → const AnsiCode
Background yellow
AnsiCode._('yellow', AnsiCodeType.background, 43, resetAll)
black → const AnsiCode
Foreground black
AnsiCode._('black', AnsiCodeType.foreground, 30, resetAll)
blue → const AnsiCode
Foreground blue
AnsiCode._('blue', AnsiCodeType.foreground, 34, resetAll)
cyan → const AnsiCode
Foreground cyan
AnsiCode._('cyan', AnsiCodeType.foreground, 36, resetAll)
darkGray → const AnsiCode
Foreground dark gray
AnsiCode._('dark gray', AnsiCodeType.foreground, 90, resetAll)
defaultForeground → const AnsiCode
Foreground default
AnsiCode._('default', AnsiCodeType.foreground, 39, resetAll)
foregroundColors → const List<AnsiCode>
All of the AnsiCode values that represent AnsiCodeType.foreground.
[black, red, green, yellow, blue, magenta, cyan, lightGray, defaultForeground, darkGray, lightRed, lightGreen, lightYellow, lightBlue, lightMagenta, lightCyan, white]
green → const AnsiCode
Foreground green
AnsiCode._('green', AnsiCodeType.foreground, 32, resetAll)
lightBlue → const AnsiCode
Foreground blue
AnsiCode._('light blue', AnsiCodeType.foreground, 94, resetAll)
lightCyan → const AnsiCode
Foreground cyan
AnsiCode._('light cyan', AnsiCodeType.foreground, 96, resetAll)
lightGray → const AnsiCode
Foreground light gray
AnsiCode._('light gray', AnsiCodeType.foreground, 37, resetAll)
lightGreen → const AnsiCode
Foreground light green
AnsiCode._('light green', AnsiCodeType.foreground, 92, resetAll)
lightMagenta → const AnsiCode
Foreground magenta
AnsiCode._('light magenta', AnsiCodeType.foreground, 95, resetAll)
lightRed → const AnsiCode
Foreground light red
AnsiCode._('light red', AnsiCodeType.foreground, 91, resetAll)
lightYellow → const AnsiCode
Foreground yellow
AnsiCode._('light yellow', AnsiCodeType.foreground, 93, resetAll)
magenta → const AnsiCode
Foreground magenta
AnsiCode._('magenta', AnsiCodeType.foreground, 35, resetAll)
red → const AnsiCode
Foreground red
AnsiCode._('red', AnsiCodeType.foreground, 31, resetAll)
resetAll → const AnsiCode
Reset values
AnsiCode._('all', AnsiCodeType.reset, 0, null)
Reset Blink
AnsiCode._('blink', AnsiCodeType.reset, 25, null)
resetBold → const AnsiCode
Reset Bold NOTE: bold is weird. The reset code seems to be 22 sometimes – not 21 See https://gitlab.com/gnachman/iterm2/issues/3208
AnsiCode._('bold', AnsiCodeType.reset, 22, null)
resetDim → const AnsiCode
Reset Dim
AnsiCode._('dim', AnsiCodeType.reset, 22, null)
resetItalic → const AnsiCode
Reset Italic
AnsiCode._('italic', AnsiCodeType.reset, 23, null)
resetReverse → const AnsiCode
Reset Reverse
AnsiCode._('reverse', AnsiCodeType.reset, 27, null)
resetUnderlined → const AnsiCode
Reset Underlined
AnsiCode._('underlined', AnsiCodeType.reset, 24, null)
blink
AnsiCode._('blink', AnsiCodeType.style, 5, resetBlink)
styleBold → const AnsiCode
bold
AnsiCode._('bold', AnsiCodeType.style, 1, resetBold)
styleDim → const AnsiCode
dim
AnsiCode._('dim', AnsiCodeType.style, 2, resetDim)
styleItalic → const AnsiCode
italic
AnsiCode._('italic', AnsiCodeType.style, 3, resetItalic)
styleReverse → const AnsiCode
reverse
AnsiCode._('reverse', AnsiCodeType.style, 7, resetReverse)
styles → const List<AnsiCode>
All of the AnsiCode values that represent AnsiCodeType.style.
[styleBold, styleDim, styleItalic, styleUnderlined, styleBlink, styleReverse]
styleUnderlined → const AnsiCode
underlined
AnsiCode._('underlined', AnsiCodeType.style, 4, resetUnderlined)
white → const AnsiCode
Foreground white
AnsiCode._('white', AnsiCodeType.foreground, 97, resetAll)
yellow → const AnsiCode
Foreground yellow
AnsiCode._('yellow', AnsiCodeType.foreground, 33, resetAll)

Properties

ansiOutputEnabled bool
Whether formatted ANSI output is enabled for AnsiCode.wrap.
read-only

Functions

Wraps uri with an escape sequence so it's recognized as a hyperlink. An optional message can be used in place of the uri. If no message is provided, the text content will be the full uri.
overrideAnsiOutput<T>(bool enableAnsiOutput, T body()) → T
Allows overriding ansiOutputEnabled to enableAnsiOutput for the code run within body.

Enums

Level
Indicates the desired logging level.