fork/mason_logger/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
.