SecurityLogger class

A simple static logger for SecureBankKit.

Logging is disabled by default. Call SecurityLogger.enable to start receiving debug output.

Logging is always off in release builds unless enable(allowInRelease: true) is used explicitly. Never log secrets – wrap sensitive values with SecurityLogger.redact.

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

debugReleaseModeOverride ↔ bool?
Visible for testing – overrides release-mode detection.
getter/setter pair
debugSink ↔ void Function(String message)?
Visible for testing – receives every emitted log line.
getter/setter pair
isEnabled → bool
Whether logging is currently enabled.
no setter

Static Methods

disable() → void
Disable logging output.
enable({bool allowInRelease = false}) → void
Enable logging output.
error(String message, {Object? error, StackTrace? stackTrace}) → void
Log an error with an optional error object and stackTrace.
info(String message) → void
Log an informational message.
redact(String? value, {int visibleStart = 0, int visibleEnd = 0, String mask = '****'}) → String
Masks a sensitive value so it can be logged safely.
sanitize(String message) → String
Scrubs well-known secret shapes (JWTs, bearer tokens, password=..., card numbers) out of a free-form log message.
warning(String message) → void
Log a warning.

Constants

redactedPlaceholder → const String
Placeholder used when a value is fully masked.