Skip to content

fix: enhance log level formatting#209

Merged
jekabs-karklins merged 1 commit intomasterfrom
feat-colorize-level
Feb 4, 2025
Merged

fix: enhance log level formatting#209
jekabs-karklins merged 1 commit intomasterfrom
feat-colorize-level

Conversation

@jekabs-karklins
Copy link
Contributor

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

Description

Updated the ConsoleLogger class to include colored output for log messages. 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.

The console logger is used in

  • Scicat
  • UOS
  • Scheduler

image

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 changed the title fix: update logger version to 2.3.0 and enhance log level formatting fix: enhance log level formatting Feb 3, 2025
Copy link
Contributor

@martin-trajanovski martin-trajanovski left a comment

Choose a reason for hiding this comment

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

Looks good to me

@jekabs-karklins jekabs-karklins merged commit 49e78aa into master Feb 4, 2025
3 checks passed
@jekabs-karklins jekabs-karklins deleted the feat-colorize-level branch February 4, 2025 09:49
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.

2 participants