feat: Add Color Logging for Error Messages #406
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces color logging for error messages in the openim::log::error function. By incorporating red color to the error logs, it aims to enhance readability and make it easier for developers to identify and debug errors in a sea of console output. The modification utilizes ANSI color codes to apply red color to both the initial error message and any subsequent messages passed to the function. This feature is implemented in a backward-compatible manner, ensuring that existing functionality remains unaffected while providing an optional visual cue for error logging.
Key Changes:
Applied these color codes to the error messages output to ensure they are displayed in red on compatible terminals.