Properties
hashCode
→ int
The hash code for this object.
no setter inherited
runtimeType
→ Type
A representation of the runtime type of the object.
no setter inherited
Methods
noSuchMethod (Invocation invocation )
→ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString ()
→ String
A string representation of this object.
inherited
Static Properties
activeTags
↔ Set <Symbol >
A filter for console output. A log is printed if untagged, or if any of
its tags are present in this set.
getter/setter pair
callbacks
→ List <void Function(LogItem item ) >
A list of callbacks invoked whenever a new log is created.
final
context
↔ String ?
A custom label for the current isolate or execution context.
getter/setter pair
enableReleaseAsserts
↔ bool
If true, logs are printed even in release builds (where asserts are
stripped). Default is false, so AOT-compiled binaries are silent
unless this is enabled.
getter/setter pair
enableStyling
↔ bool
If true, enables colors and other ANSI styling in the console output.
getter/setter pair
items
→ Queue <LogItem >
An in-memory queue of the most recent log items, capped by maxStoredLogs.
final
maxStoredLogs
↔ int
The maximum number of logs to keep in memory. Older logs are discarded.
getter/setter pair
onLogDiscarded
↔ void Function(LogItem discardedItem ) ?
Called when the log queue is full and the oldest log is about to be
discarded. Receives the LogItem being removed.
getter/setter pair
showIds
↔ bool
If true, the logs will be printed with IDs.
getter/setter pair
showTags
↔ bool
If true, the logs will be printed with tags.
getter/setter pair
showTimestamps
↔ bool
If true, the logs will be printed with timestamps.
getter/setter pair
storeLogs
↔ bool
If true, new logs are added to the in-memory items queue.
getter/setter pair
Static Methods
addCallback (void callback (LogItem logItem ) )
→ void Function(LogItem item )
Registers a function to be called for each new log item.
Returns the callback to allow for later removal.
addTags (Set <Symbol > tags )
→ void
Adds tags to activeTags .
alert (Object ? message , [Set <Symbol > tags = const {} , int initialStackLevel = 0 ])
→ _LogMessage
clear ()
→ void
Clears the in-memory log history.
err (Object ? message , [Set <Symbol > tags = const {} , int initialStackLevel = 0 ])
→ _LogMessage
exportLogsAsJsonLines ()
→ String
Exports all stored logs as a JSONL string (one JSON object per line).
ignore (Object ? message , [Set <Symbol > tags = const {} , int initialStackLevel = 0 ])
→ _LogMessage
info (Object ? message , [Set <Symbol > tags = const {} , int initialStackLevel = 0 ])
→ _LogMessage
log ({_IconCategory? category , Object ? message , Object ? metadata , AnsiStyle ? messageStyle , AnsiStyle ? nonMessageStyle , Set <Symbol > tags = const {} , bool includePath = true , int initialStackLevel = 0 })
→ _LogMessage
message (Object ? message , [Set <Symbol > tags = const {} , int initialStackLevel = 0 ])
→ _LogMessage
ok (Object ? message , [Set <Symbol > tags = const {} , int initialStackLevel = 0 ])
→ _LogMessage
printBlack (Object ? message , [int initialStackLevel = 0 ])
→ _LogMessage
printBlue (Object ? message , [int initialStackLevel = 0 ])
→ _LogMessage
printCyan (Object ? message , [int initialStackLevel = 0 ])
→ _LogMessage
printGreen (Object ? message , [int initialStackLevel = 0 ])
→ _LogMessage
printLightBlack (Object ? message , [int initialStackLevel = 0 ])
→ _LogMessage
printLightBlue (Object ? message , [int initialStackLevel = 0 ])
→ _LogMessage
printLightCyan (Object ? message , [int initialStackLevel = 0 ])
→ _LogMessage
printLightGreen (Object ? message , [int initialStackLevel = 0 ])
→ _LogMessage
printLightPurple (Object ? message , [int initialStackLevel = 0 ])
→ _LogMessage
printLightRed (Object ? message , [int initialStackLevel = 0 ])
→ _LogMessage
printLightWhite (Object ? message , [int initialStackLevel = 0 ])
→ _LogMessage
printLightYellow (Object ? message , [int initialStackLevel = 0 ])
→ _LogMessage
printPurple (Object ? message , [int initialStackLevel = 0 ])
→ _LogMessage
printRed (Object ? message , [int initialStackLevel = 0 ])
→ _LogMessage
printWhite (Object ? message , [int initialStackLevel = 0 ])
→ _LogMessage
printYellow (Object ? message , [int initialStackLevel = 0 ])
→ _LogMessage
removeCallback (void callback (LogItem item ) )
→ void
Unregisters a previously added callback from the callbacks list.
removeTags (Set <Symbol > tags )
→ void
Removes tags from activeTags .
start (Object ? message , [Set <Symbol > tags = const {} , int initialStackLevel = 0 ])
→ _LogMessage
stop (Object ? message , [Set <Symbol > tags = const {} , int initialStackLevel = 0 ])
→ _LogMessage
trace (Object ? message , [Set <Symbol > tags = const {} , int initialStackLevel = 0 ])
→ _LogMessage
useDeveloperLog ()
→ void
Redirects output to developer.log, which is often richer in IDEs.
useStandardPrint ()
→ void
Resets the output function to the standard print.