inline_logger 0.2.0
inline_logger: ^0.2.0 copied to clipboard
A powerful inline logger for Flutter. Log anywhere in your widget tree without breakpoints. Chain logging calls directly on any expression.
0.2.0 #
- Clickable source locations — Every log line now includes the exact
call site appended at end-of-line in parentheses as
(<uri>:<line>:<column>)— the only format VS Code (Dart-Code) and Android Studio / IntelliJ recognise as clickable. Clicking the link jumps directly to that line of source code. Example:... App starting (package:my_app/main.dart:25:5). - The trailing parenthesised segment is intentionally un-styled (no ANSI) so the IDE's stack-frame scanner matches it; level color still applies to the rest of the line.
- New
SourceLocationclass — stores the originalUri(sopackage:URIs are preserved verbatim) plus line, optional column, and optional enclosing member. Exposes a backwards-compatiblefilePathgetter and string-based constructor. - New
SourceLocationResolverto automatically capture call sites viaStackTrace.current, skipping internal package frames. - New
LinkFormatenum:packageUri— emitspackage:foo/bar.dartURIs verbatim.fileUri— emitsfile:///abs/pathURIs.bareAbsolute— emits/abs/path(kept for older IntelliJ versions).auto(default) — pickspackageUriforpackage:frames andfileUriotherwise.projectRelative— deprecated. Project-relative paths are not clickable in any IDE; silently falls back to the file URI form.
- New
LogRecorddata class bundling all log event metadata. - New
LoggerConfigflags:showSourceLocation— Master switch (default:truein debug).showFilePath,showLineNumber,showMemberName.showColumnNumber— the rendered string always includes a column (IDEs require it); this flag controls whether the column comes from the stack frame (true) or is forced to:1(false).useClickableLinks— whenfalse, omits the location segment entirely. The location is still attached toLogRecord.sourceforonRecord/logHistoryconsumers.clickableLinkFormat— Choose link format (default:auto).
- New extensibility hooks:
LoggerConfig.onRecord— Sink for forwarding records to Crashlytics, Sentry, DevTools, etc.LoggerConfig.formatter— Custom formatter override.
LoggerConfig.logHistorynow storesLogRecordobjects with full metadata including source locations.- Extracted
ConsoleFormatterfor testability and customization. - Refactored source into separate files under
lib/src/. - Zero-cost guarantee:
StackTrace.currentis only invoked after passing bothenabledandminLevelfilters. - No breaking changes to existing API. All existing call signatures, flags, and behavior remain identical.
0.1.0+2 #
- Added color-coded console output with ANSI color codes
- Different colors for each log level (gray, cyan, blue, green, yellow, red, bright red)
- New
LoggerConfig.useColorsconfiguration option - Updated documentation with color feature information
0.1.0+1 #
- Updated README with maintainer information
- Added credits for contributors
0.1.0 #
- Initial release
- Inline chainable logging for Flutter
- 7 log levels (Debug, Verbose, Info, Success, Warning, Error, Critical)
- Extension methods for inline logging
- Static logging methods
- API request/response logging
- Navigation, state, and lifecycle logging
- Log history support
- Stack trace support for errors
- Configurable timestamps and emojis
- Auto-disabled in release mode