ghost_logger 1.2.0
ghost_logger: ^1.2.0 copied to clipboard
Can be Unseen but always there. Stealing errors before they steal your users' experience. A flexible logging utility with optional crash reporting integration.
1.2.0 #
Features #
Long Message Support (LoggerType.print)
- Long messages are now automatically split into 1,000-character chunks internally, preventing
print()from clipping output - Added
maxMessageLengthparameter toGhostLogger.configure()— set a character cap on printed messages; messages exceeding the limit are truncated with a... [truncated]indicator - Truncation applies to both
LoggerType.printandLoggerType.console; stack traces are always printed in full regardless of this setting
File Logging
- Added per-session, per-level log file persistence — logs are written to the application support directory as
ghost_logger_{level}_{timestamp}.log - New
configure()flags:storeDebug,storeInfo,storeWarnings,storeErrors— all default tofalse; enable only the levels you need - File logging runs in release builds — not gated by
isDebugMode, making it suitable for production monitoring - Added
onLogFileUpdatedcallback — fires each time a line is written to a file, receiving theFileandLogLevel - Added
GhostLogger.exportLogs()— returns active log files on demand; accepts aLogExportScopeparameter (currentSessionorallSessions) to access files from previous sessions too - Added
GhostLogger.cleanOldLogs()— deletes log files older thanlogRetentionDays(default: 7 days); passincludeRecents: trueto wipe all log files regardless of age - Added
autoCleanOldLogsflag (default:true) — runscleanOldLogs()automatically at startup when any store flag is enabled - Added
logRetentionDaysparameter (default:7) — controls how long log files are kept before cleanup - Added reentrancy guard — prevents infinite loops when
onLogFileUpdatedcallsGhostLogger.log*()internally - Platform note: File logging is not supported on Flutter Web; a debug warning is emitted if attempted
New Exports
LogExportScopeenum is now exported from the package barrel file
Dependencies #
- Added
path_provider: ^2.1.5for cross-platform application support directory access
1.1.1 #
- DOCS: Updated README with convenience methods examples
- DOCS: Added comprehensive API reference
- DOCS: Improved Firebase Crashlytics integration guide
- DOCS: Added troubleshooting section
- No code changes
1.1.0 #
Features #
- Added convenience logging methods:
GhostLogger.logDebug()- Debug loggingGhostLogger.logInfo()- Info loggingGhostLogger.logWarning()- Warning loggingGhostLogger.logError()- Error logging
Bug Fixes #
- Fixed color output issues in Android Studio console
- Improved color reset reliability with separate print calls
Breaking Changes #
- Removed
LoggerType.loggerenum value - Use
LoggerType.consoleinstead if you were usingLoggerType.logger
1.0.0 #
- Added colored terminal output for log levels
isDebugModenow defaults tokDebugMode- Package now depends on Flutter SDK
0.1.0 #
- Initial release