Logger class

Lightweight colored logger. No external deps.

Honors:

  • NO_COLOR env var (https://no-color.org)
  • non-TTY stdout (piped output): strips ANSI escapes
  • Windows: only if stdout.supportsAnsiEscapes reports true

Constructors

Logger()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

verbose bool
Verbose mode for extra diagnostics. Toggled by --verbose flag or SRIK_DEBUG env var.
getter/setter pair

Static Methods

debug(String message) → void
Only printed when verbose mode is on.
dim(String message) → void
error(String message) → void
info(String message) → void
plain(String message) → void
setColorOverride(bool? value) → void
Force-enable or force-disable ANSI colors (mainly for tests).
success(String message) → void
warn(String message) → void