Logger class
The core logging utility for the Kronix framework.
It supports multiple output drivers, JSON logging, and contextual logging with Request-IDs.
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
-
debug(
String message, [Map< String, dynamic> ? data]) → void - Logs a debug message.
-
error(
String message, {Object? error, StackTrace? stackTrace, Map< String, dynamic> ? data}) → void -
Logs an
errormessage with optionalerrorandstackTrace. -
info(
String message, [Map< String, dynamic> ? data]) → void - Logs an info message.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
warning(
String message, [Map< String, dynamic> ? data]) → void - Logs a warning message.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
Static Methods
-
staticDebug(
String message, [Map< String, dynamic> ? data]) → void - Static helper for logging debug info.
-
staticError(
String message, {Object? error, StackTrace? stackTrace, Map< String, dynamic> ? data}) → void - Static helper for logging an error.
-
staticInfo(
String message, [Map< String, dynamic> ? data]) → void - Static helper for logging info.
-
staticWarning(
String message, [Map< String, dynamic> ? data]) → void - Static helper for logging a warning.
-
withContext(
Context ctx) → Logger -
Creates a Logger instance configured with metadata from the
ctx.