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
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
errorobject andstackTrace. -
info(
String message) → void - Log an informational message.
-
redact(
String? value, {int visibleStart = 0, int visibleEnd = 0, String mask = '****'}) → String -
Masks a sensitive
valueso 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 logmessage. -
warning(
String message) → void - Log a warning.
Constants
- redactedPlaceholder → const String
- Placeholder used when a value is fully masked.