Logger class

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

earlyBreadcrumbBufferLengthForTest int
Test-only: current early-breadcrumb buffer length.
no setter

Static Methods

Records a breadcrumb — a trail event attached to the next captured error.
drainEarlyBreadcrumbs() List<BufferedBreadcrumb>
Snapshots and clears the early-breadcrumb buffer for the attach-time flush (owned by appInitErrorHandling in Phase 3). Clearing on read prevents a re-flush of the same entries. The caller forwards each to the now-attached reporter without re-redacting (they were redacted at emit time).
error(Object error, [String? message, StackTrace? stackTrace]) → void
log(LogLevel level, String message) → void
redactErrorForReporting(Object error) Object
Redacts an error before it is forwarded to a reporter from the error chokepoint (_recordErrorSafe, Phase 3). Reuses the central, backend- agnostic redaction (ERH-005) so error payloads get the same fail-closed scrubbing as breadcrumbs (BEH-8).
resetEarlyBreadcrumbBufferForTest() → void
Test-only: clear the early-breadcrumb buffer so module-level state does not leak across test cases.
setCustomErrorReporter(ErrorReporter? reporter) → void
Set a custom error reporter for logging errors This is typically called automatically by the error handling initialization
setErrorReportingConfig(ErrorReportingConfig? config) → void
Set the error reporting configuration This is typically called automatically by the error handling initialization
setLogFunction(dynamic function(String message)?) → void