log_and_shake 1.1.1 copy "log_and_shake: ^1.1.1" to clipboard
log_and_shake: ^1.1.1 copied to clipboard

A developer-friendly package for logging and debugging via shake gestures. Great for debugging in dev builds.

Changelog #

All notable changes to this project will be documented in this file.

1.1.1 - 2026-04-27 #

Added #

  • Debug log level — new LogLevel.debug and LogAndShake.logD() method
  • Tag support — all log methods (log, logD, logI, logW, logE) now accept an optional tag parameter; tags are displayed in the log screen
  • Search with navigation — search bar with match counter and up/down arrow navigation between results
  • Level filter chips — filter the log list by Debug / Info / Warning / Error
  • Improved error capture — now also captures Flutter framework errors (FlutterError.onError) and platform callback errors (PlatformDispatcher.onError)
  • Stack trace merging — rapid consecutive stack frame lines (within 150 ms) are merged into a single collapsible log entry instead of appearing as separate rows
  • Auto-scroll to bottom — log screen automatically scrolls to new entries when the user is already near the bottom; stays in place when reading old logs

Changed #

  • LogService now extends ChangeNotifier — logs stream live to the open screen without needing to reopen it
  • Long log messages now wrap to the next line within the horizontal scroll area instead of extending infinitely off-screen
  • Timestamp format simplified from HH:MM:SS.mmm to HH:MM:SS
  • Level serialization uses name instead of index (safer against future enum changes)
  • logs getter now returns an unmodifiable list

Fixed #

  • debugPrint override now applied before zone setup, preventing double-logging from packages that reassign debugPrint
  • Removed 'bad' keyword from automatic error-level detection (was causing false positives)

1.1.0 - 2025-01-25 #

Added #

  • Timestamps: Each log entry now displays a timestamp in HH:MM:SS.mmm format for precise timing information
  • Log Rotation: Configurable maximum log count (default: 1000) to prevent memory bloat during long sessions
    • Use LogAndShake.setMaxLogCount(count) to customize
    • Automatically removes oldest logs when limit is reached
  • Export Functionality: Share and copy logs with ease
    • Export logs as a text file via native share dialog
    • Copy all logs to clipboard with one tap
    • Accessible via new "More Options" menu in the log screen
  • Stack Trace Formatting: Improved readability for error logs
    • Automatic detection of stack traces in log messages
    • Collapsible/expandable sections for stack traces
    • Clean, formatted display with gray background
    • Copy stack trace separately with dedicated button
    • Shows first 10 lines with indicator for remaining lines
  • Log Persistence: Optional log persistence across app restarts
    • Enable with persistLogs: true parameter in LogAndShake.run()
    • Logs are saved using SharedPreferences
    • Automatically loads previous session logs on startup

Changed #

  • Log list items are now expandable when they contain stack traces
  • AppBar now uses a PopupMenu for better organization of actions
  • Improved overall UI/UX of the log screen

1.0.2 #

Changed #

  • Add new parameters to shake 'shakeThreshold, minimumShakeCount, and useFilter', and change the default values.

1.0.1 #

Changed #

  • Fix open dialog again if Log screen already opened
  • Add clean and readable example

1.0.0 #

Added #

  • Initial release
  • Shake to view logs functionality
  • Automatic capture of print() statements and uncaught exceptions
  • Log level detection (Info, Warning, Error)
  • Search and filter logs
  • Clear logs functionality
  • Production safety (only enabled in dev/profile builds)
2
likes
130
points
20
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A developer-friendly package for logging and debugging via shake gestures. Great for debugging in dev builds.

Repository (GitHub)

Topics

#debug #logging #shake #developer-tools

License

MIT (license)

Dependencies

flutter, path_provider, scrollable_positioned_list, shake, share_plus, shared_preferences

More

Packages that depend on log_and_shake