live_log_care 2.3.0
live_log_care: ^2.3.0 copied to clipboard
Redaction-safe logging for Flutter: build-mode gated (silent in release) and auto-scrubs passwords, tokens, cookies, OTPs and PII from logs, Dio and Bloc.
Changelog #
2.3.0 #
Added #
HttpLogRecord/HttpLogKind— structured HTTP log payload emitted byRedactingDioInterceptorfor custom formatters.CleanPrinter.decorateHttp(defaulttrue) — renders HTTP logs as labeled, sectioned boxes (Request / Response / Error) so requests and responses are easy to distinguish in the Debug Console.LiveLogConfig.clean(decorateHttp: …)— opt out withdecorateHttp: falsefor the previous flat→ METHOD urllayout.
Changed #
RedactingDioInterceptornow emitsHttpLogRecordinstead of plain strings.LiveLogConfig.clean()enables HTTP box decoration by default.
2.2.0 #
Changed #
RedactingDioInterceptornow defaults toprettyJson: true, so request and response bodies render as indented JSON out of the box. Besides being readable, the per-field line breaks stop the console from truncating long single-lineMap.toString()bodies. PassprettyJson: falsefor the old compact form.- Security default change:
LiveLogConfig.revealSecretsInDebugnow defaults tokDebugMode(wasfalse). Secret values are shown in debug logs by default to aid local debugging; release builds are still always redacted, guaranteed by thekDebugModeguard inLiveLog.redactionActive. If your debug logs may be screenshotted, screen-shared, or captured in CI artifacts, passrevealSecretsInDebug: falseto restore full redaction in debug.
2.1.0 #
Added #
LiveLogConfig.revealSecretsInDebug(defaultfalse): reveal real secret values in debug builds only to aid local debugging. Release builds are always redacted regardless of this flag. Exposed asLiveLog.redactionActive.
Changed #
RedactingDioInterceptornow honors the redaction state (redactionEnabled/revealSecretsInDebug) likeLiveLogdoes. Previously it always redacted; nowredactionEnabled: false(or a debug reveal) also applies to network logs. No effect with the default (redaction on).
2.0.0 #
Breaking #
- Removed the
loggerdependency; the logging engine is now self-contained.LogLevelis now this package's own enum (member names unchanged, soLogLevel.erroretc. keep working), andLiveLogConfig.printer/.outputnow take this package'sLogPrinter/LogOutputtypes. Apps that passed alogger-basedPrettyPrinteror custom printer/output must switch to the bundled ones (BoxedPrinter,CleanPrinter,ConsoleOutput, …).
Added #
- Self-contained logging core:
LogLevel,LogEvent,OutputEvent,LogPrinter,LogOutput,LogFilter. - Printers:
BoxedPrinter(default — the familiar boxed, colored look) andCleanPrinter(borderless, prefix-free). - Outputs:
ConsoleOutput(default),DevLogOutput(dart:developer.log),MultiOutput(fan-out), and a WASM-safeFileOutput. - Filters: pluggable
LogFilter(LiveLogConfig.filter) with the defaultThresholdFilter. LiveLogConfig.clean()preset: indented-JSON, no box, noI/flutter (PID):prefix in the VS Code Debug Console.RedactingDioInterceptor(prettyJson: true)renders request/response headers and bodies as indented JSON instead ofMap.toString().LogRedactor.prettyJson/redactJsonhelpers.
Fixed #
- WASM compatibility: dropping
loggerremoves itsdart:io-importing web stub; the package now compiles cleanly to WASM. - Raised the
diolower bound to>=5.2.0(first version withDioException), fixing pub.dev downgrade analysis.
1.0.0 #
Initial release.
LiveLog— static, redaction-safe logging facade (t/d/i/w/e).- Build-mode gating via
ProductionFilter+ level: in release onlywarninganderrorare emitted by default. LogRedactor— scrubs passwords, tokens, cookies, OTPs, national IDs, auth headers, bearer/JWT tokens and card numbers from every message, header map and request/response body. Extend withaddSensitiveKeys,addValuePatternsand a custommask.RedactingDioInterceptor— redaction-safe Dio logger; debug-only by default, opt-in release logging vialogInRelease.LiveLogBlocObserver— routes Bloc/Cubit lifecycle + errors throughLiveLog.CrashSink— pluggable interface to forward releaseerrors to Crashlytics/Sentry without depending on either.LiveLogConfig— optional startup configuration (enable/disable, debug/release levels, custom printer/output, crash sink, redaction toggle).