Central structured logger for the nano-core ecosystem.
Formats and outputs structured, color-coded, and tagged log records with support for method tracking, data payloads, and error hooks.
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
- customPrinter ↔ void Function(String formattedMessage)?
-
Optional custom printer callback overriding default console output.
getter/setter pair
- enabled ↔ bool
-
Global master switch for logging. Defaults to kDebugMode.
getter/setter pair
- filter ↔ NanoLogFilter
-
Active log filter determining which levels are emitted.
getter/setter pair
- maxStackTraceLines ↔ int
-
Maximum number of stack trace frames to render in console logs.
getter/setter pair
- onError ↔ void Function(NanoLogEntry entry)?
-
Optional telemetry hook invoked whenever an error or warning is logged.
getter/setter pair
- showColors ↔ bool
-
Whether to render ANSI colors in terminal outputs.
getter/setter pair
- showTimestamp ↔ bool
-
Whether to include timestamps in the formatted output.
getter/setter pair
Static Methods
-
debug(
String message, {String? tag, String? method, Object? data}) → void - Logs a NanoLogLevel.debug diagnostic message.
-
disable(
) → void - Disables all logging outputs.
-
enable(
) → void - Enables all logging outputs.
-
error(
String message, {String? httpMethod, int? statusCode, String? tag, String? method, Object? data, Object? error, StackTrace? stackTrace}) → void - Logs a NanoLogLevel.error failure or exception.
-
format(
NanoLogEntry entry) → String - Formats a NanoLogEntry into a structured, readable string.
-
http(
String message, {String? httpMethod, int? statusCode, String? tag, String? method, Object? data, Object? error}) → void - Logs a NanoLogLevel.http network event.
-
info(
String message, {String? tag, String? method, Object? data}) → void - Logs a NanoLogLevel.info operational message.
-
init(
{NanoLogFilter? filter, bool? enabled, bool? showTimestamp, bool? showColors, int? maxStackTraceLines, void customPrinter(String formattedMessage)?, void onError(NanoLogEntry entry)?}) → void - Initializes and configures global NanoLogger settings in a single call.
-
mute(
) → void - Mutes logging (alias for disable).
-
reset(
) → void - Resets all NanoLogger configurations back to their default values.
-
setFilter(
NanoLogFilter newFilter) → void - Sets the active NanoLogFilter.
-
success(
String message, {String? tag, String? method, Object? data}) → void - Logs a NanoLogLevel.success completion message.
-
unmute(
) → void - Unmutes logging (alias for enable).
-
warning(
String message, {String? tag, String? method, Object? data, Object? error, StackTrace? stackTrace}) → void - Logs a NanoLogLevel.warning non-fatal alert.