colorful_log_plus 1.0.3
colorful_log_plus: ^1.0.3 copied to clipboard
A Dart package for logging messages with colorful console outputs for enhanced readability and debugging.
Changelog #
All notable changes to this project will be documented in this file.
1.0.3 - 2025-02-02 #
-
Fixed:
- Caller File Path Bug:
debugLog
now correctly shows the actual calling file (e.g.,translate_tap.dart
) instead of internal package files (services.dart
).- Dynamically filters internal package calls (
colorful_log_plus/
) to find the first external caller. - Ensures log file paths remain clickable in IDEs.
- Caller File Path Bug:
-
Changed:
- Improved Stack Trace Processing:
- Enhanced log path detection to be fully automatic, ignoring internal logs dynamically.
- Better IDE clickability in VS Code and IntelliJ.
- Improved Stack Trace Processing:
1.0.2 - 2025-02-02 #
-
Fixed:
- Caller File Path Accuracy:
debugLog
now correctly displays the calling file (e.g.,translate_tap.dart
) instead of always showingdebug_log.dart
.- Stack trace processing has been enhanced to ignore internal logs and correctly capture the first external caller.
- Log messages with
showLogAddress: true
now provide a clickable absolute file path.
- Caller File Path Accuracy:
-
Changed:
- Improved Stack Trace Parsing:
- Extracted stack trace logic to scan multiple frames and detect the first non-internal call.
- Enhanced package-based path resolution to ensure paths are correctly converted to absolute file paths on all platforms.
- Better support for VS Code and IntelliJ, ensuring log file paths are clickable and navigable.
- Improved Stack Trace Parsing:
1.0.1 - 2025-02-02 #
-
Added:
- Introduced
DebugLogServices.extractFileInfo()
to handle file path extraction. - Added
_extractFileInfoService()
for resolving absolute file paths. - Implemented full cross-platform file path retrieval, ensuring:
- ✅ Windows/macOS/Linux → Absolute paths are extracted.
- ✅ Android/iOS → Relative paths are used.
- ✅ Web → Displays relative paths only (no filesystem access).
- Introduced
-
Changed:
- Refactored
debugLog
:- Extracted stack trace handling into a dedicated service (
DebugLogServices
). - Improved log formatting for better readability and consistency.
- Extracted stack trace handling into a dedicated service (
- Updated API:
debugLog
now callsDebugLogServices.extractFileInfo()
instead of inline stack trace processing.
- Refactored
-
Fixed:
- Clickable log file paths:
- File paths in logs are now formatted as
file://
URLs for IDE compatibility. - Clicking the log address in VS Code / IntelliJ now navigates to the correct file & line.
- File paths in logs are now formatted as
- Fixed inconsistencies in file path resolution across platforms.
- Clickable log file paths:
1.0.0 - 2025-02-02 #
-
Added:
-
Initial stable release.
-
Introduced a structured logging system with:
- Customizable tags for better organization.
- ANSI color support for improved readability.
- Icons for different log levels (info, warning, error, debug).
- Error and stack trace logging for better debugging.
- Optional source file tracking for precise debugging.
-
Changed:
-
Improved
debugLog
function to support structured logging. -
Enhanced color and tag formatting for consistency.
-
Refactored API for ease of use.
-
Fixed:
-
Resolved minor formatting inconsistencies.
-
Ensured proper handling of log messages across different platforms.
0.0.3 - 2025-01-28 #
- Added:
- Comments to LogColor enum for clarity
0.0.2 - 2025-01-28 #
-
Added:
-
Added
tagColor
parameter to thedebugLog
function, allowing customization of the color of the tag or type in log messages. -
Changed:
-
Updated the
debugLog
function to includetagColor
for more flexible and visually distinct log formatting.
0.0.1 - 2025-01-27 #
-
Added:
-
Added the
debugLog
function to log messages with custom colors, tags, errors, and stack traces. -
Introduced the
LogColor
enum for customizable log colors, includingred
,green
,yellow
,blue
,magenta
, andcyan
. -
Added example usage in the
example/
directory. -
Added support for logging errors and stack traces using
debugLog
. -
Changed:
-
Refactored the
logger
method todebugLog
and moved it outside theDebug
class for a more familiar API. -
Updated the public API structure to export
debugLog
viacolorful_log.dart
. -
Fixed:
-
Resolved issues with inconsistent log formatting for type and tag combinations.
[Unreleased] #
- Future changes and updates will be added here.