mason_logger library
A reusable Dart logger used by the Mason CLI.
Get started at https://github.com/felangel/mason 🧱
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. - LogTheme
- A theme object which contains styles for all log message types.
- 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.
Enums
- Level
- Indicates the desired logging level.
Constants
- backgroundBlack → const AnsiCode
- backgroundBlue → const AnsiCode
-
backgroundColors
→ const List<
AnsiCode> - All of the AnsiCode values that represent AnsiCodeType.background.
- backgroundCyan → const AnsiCode
- backgroundDarkGray → const AnsiCode
- backgroundDefault → const AnsiCode
- backgroundGreen → const AnsiCode
- backgroundLightBlue → const AnsiCode
- backgroundLightCyan → const AnsiCode
- backgroundLightGray → const AnsiCode
- backgroundLightGreen → const AnsiCode
- backgroundLightMagenta → const AnsiCode
- backgroundLightRed → const AnsiCode
- backgroundLightYellow → const AnsiCode
- backgroundMagenta → const AnsiCode
- backgroundRed → const AnsiCode
- backgroundWhite → const AnsiCode
- backgroundYellow → const AnsiCode
- black → const AnsiCode
- blue → const AnsiCode
- cyan → const AnsiCode
- darkGray → const AnsiCode
- defaultForeground → const AnsiCode
-
foregroundColors
→ const List<
AnsiCode> - All of the AnsiCode values that represent AnsiCodeType.foreground.
- green → const AnsiCode
- lightBlue → const AnsiCode
- lightCyan → const AnsiCode
- lightGray → const AnsiCode
- lightGreen → const AnsiCode
- lightMagenta → const AnsiCode
- lightRed → const AnsiCode
- lightYellow → const AnsiCode
- magenta → const AnsiCode
- red → const AnsiCode
- resetAll → const AnsiCode
- resetBlink → const AnsiCode
- resetBold → const AnsiCode
- resetDim → const AnsiCode
- resetItalic → const AnsiCode
- resetReverse → const AnsiCode
- resetUnderlined → const AnsiCode
- styleBlink → const AnsiCode
- styleBold → const AnsiCode
- styleDim → const AnsiCode
- styleItalic → const AnsiCode
- styleReverse → const AnsiCode
-
styles
→ const List<
AnsiCode> - All of the AnsiCode values that represent AnsiCodeType.style.
- styleUnderlined → const AnsiCode
- white → const AnsiCode
- yellow → const AnsiCode
Properties
- ansiOutputEnabled → bool
-
Whether formatted ANSI output is enabled for
wrapWith
and AnsiCode.wrap.no setter
Functions
-
link(
{required Uri uri, String? message}) → String -
Wraps
uri
with an escape sequence so it's recognized as a hyperlink. An optional message can be used in place of theuri
. If nomessage
is provided, the text content will be the fulluri
. -
overrideAnsiOutput<
T> (bool enableAnsiOutput, T body()) → T -
Allows overriding ansiOutputEnabled to
enableAnsiOutput
for the code run withinbody
.