ConsoleLogger class

Console logger implementation for development and debugging.

Provides structured logging with configurable levels and the ability to disable logging in production builds.

Implemented types

Constructors

ConsoleLogger(String name, [LogLevel level = LogLevel.info])
Creates a console logger with given name and optional level.

Properties

hashCode → int
The hash code for this object.
no setterinherited
isDebugEnabled → bool
Check if debug logging is enabled (to avoid expensive string building)
no setteroverride
isInfoEnabled → bool
Check if info logging is enabled
no setteroverride
level → LogLevel
The minimum log level to output.
final
name → String
The logger name, typically the class or module being logged.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

debug(String message, [Object? context]) → void
Log a debug message (lowest priority)
override
error(String message, [Object? error, StackTrace? stackTrace]) → void
Log an error message
override
info(String message, [Object? context]) → void
Log an informational message
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited
warn(String message, [Object? context]) → void
Log a warning message
override

Operators

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