Skip to content

feat: colorize log output#933

Merged
jekabs-karklins merged 5 commits intodevelopfrom
fix-colorize-console-logger
Feb 6, 2025
Merged

feat: colorize log output#933
jekabs-karklins merged 5 commits intodevelopfrom
fix-colorize-console-logger

Conversation

@jekabs-karklins
Copy link
Contributor

@jekabs-karklins jekabs-karklins commented Feb 4, 2025

Description

Info messages are now bold, error messages appear in red, and warnings are shown in yellow. These changes improve the readability of log outputs in the console making it easier to spot the error outputs.
image

Relates to: UserOfficeProject/user-office-lib#209

Motivation and Context

The changes were made to enhance the clarity of log outputs, making it easier to distinguish between different types of log messages at a glance, ultimately aiding in debugging and monitoring.

Changes

  • Added ANSI color codes to format INFO, ERROR, and WARN log levels.
  • Refactored the log method in ConsoleLogger to apply the appropriate color formatting.

@jekabs-karklins jekabs-karklins requested a review from a team as a code owner February 4, 2025 10:04
@jekabs-karklins jekabs-karklins requested review from Scott-James-Hurley and removed request for a team February 4, 2025 10:04
@jekabs-karklins jekabs-karklins changed the title chore(deps): update duo-logger to version 2.3.0 chore(deps): colorize log output Feb 4, 2025
@TCMeldrum
Copy link
Contributor

I think this is going to screw with our log processing, would we be able to toggle off the colouring? No problem if not we can work around it if needed.

@jekabs-karklins
Copy link
Contributor Author

I think this is going to screw with our log processing, would we be able to toggle off the colouring? No problem if not we can work around it if needed.

Thanks, @TCMeldrum , I can definitely add it

@janosbabik janosbabik self-requested a review February 4, 2025 11:57
Copy link
Contributor

@TCMeldrum TCMeldrum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@jekabs-karklins
Copy link
Contributor Author

I think this is going to screw with our log processing, would we be able to toggle off the colouring? No problem if not we can work around it if needed.

@TCMeldrum, thank you for bringing this to my attention. My previous changes should have been a major version update. I have now ensured that the functionality remains unchanged.

Please review and, if acceptable, approve this PR on the logger library:
UserOfficeProject/user-office-lib#210

@jekabs-karklins jekabs-karklins changed the title chore(deps): colorize log output feat: colorize log output Feb 4, 2025
@jekabs-karklins jekabs-karklins enabled auto-merge (squash) February 4, 2025 21:13
@jekabs-karklins jekabs-karklins merged commit aa3cfde into develop Feb 6, 2025
20 checks passed
@jekabs-karklins jekabs-karklins deleted the fix-colorize-console-logger branch February 6, 2025 10:58
@ACLay ACLay mentioned this pull request Feb 7, 2025
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants