Logger class abstract

A simple logger that logs messages to the console. PCI DSS compliant with optional sensitive data redaction.

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

enabled ↔ bool
Global enable flag. Set to false to silence all logging (including in debug builds) without changing call sites - useful for tests that don't want to capture/parse log output, or to mute the logger under a runtime setting.
getter/setter pair
globalRedact ↔ bool
Global redaction flag - set to false to disable redaction globally.
getter/setter pair

Static Methods

addSensitiveKeys(Iterable<String> keys) → void
Adds custom sensitive keys to the redactor.
boxed(dynamic message, {String? tag, Object? error, bool? redact}) → void
Logs a message with a box around it.
d(dynamic message, {String? tag, Object? error, bool? redact}) → void
Logs a debug message.
e(dynamic message, {Object? error, StackTrace? stackTrace, String? tag, bool? redact}) → void
Logs an error message.
i(dynamic message, {String? tag, Object? error, bool? redact}) → void
Logs an info message.
isSensitiveKey(String key) → bool
Checks if a key is sensitive.
json(dynamic data, {String? tag, bool? redact}) → void
Logs a Map or List with pretty formatting.
raw(dynamic message, {String? tag, bool? redact}) → void
Logs raw data without formatting (useful for large payloads).
redactData(dynamic input) → dynamic
Redacts sensitive data from input.
removeSensitiveKeys(Iterable<String> keys) → void
Removes keys from the sensitive set.
s(dynamic message, {String? tag, bool? redact}) → void
Logs a success message.
w(dynamic message, {String? tag, Object? error, bool? redact}) → void
Logs a warning message.