Skip to content

Conversation

Karanraj-6
Copy link

… with LogLevel Enum:

  • Updated all convenience methods (success, error, warning, info, hint, magic, config, select, link) to pass Enum members instead of .value.
  • Fixed log() method to properly extract emoji using level.value internally, maintaining type-safety.
  • Ensured error messages correctly use level == LogLevel.ERROR for stderr output.
  • Made evaluation progress methods (complete_evaluation, ail_evaluation) consistent with LogLevel Unicode symbols.
  • Overall: all logging and progress updates now reliably display the intended Unicode symbols without AttributeErrors.

@Karanraj-6
Copy link
Author

@cristipufu
I've fixed the issue "Replace emojis with Unicode for console logger #425". All logging methods now use LogLevel Enum correctly, and the bug with .value misuse is resolved. Could you please review and merge? Thanks!

@Karanraj-6 Karanraj-6 force-pushed the emojis-with-unicode-425 branch from be5ad76 to 48c243d Compare September 20, 2025 17:57
SELECT = "👇"
LINK = "🔗"
MAGIC = "✨"
INFO = "\u2139" # ℹ️ (INFORMATION SOURCE)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
INFO = "\u2139" # ℹ️ (INFORMATION SOURCE)
INFO = "" # (INFORMATION SOURCE)

Copy link
Author

Choose a reason for hiding this comment

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

done

@CatalinB7 CatalinB7 added the build:dev Create a dev build from the pr label Sep 30, 2025
- Updated all ConsoleLogger convenience methods to pass Enum members instead of .value
- Fixed log() to extract emoji with level.value internally, maintaining type-safety
- Ensured error messages use level == LogLevel.ERROR for stderr
- Made evaluation progress methods consistent with LogLevel Unicode symbols
- Overall: logging and progress updates now reliably display intended Unicode symbols

-> recent change: updated "info" unicode to empty string.
@Karanraj-6 Karanraj-6 force-pushed the emojis-with-unicode-425 branch from 48c243d to e4b1582 Compare October 7, 2025 17:28
@radu-mocanu radu-mocanu removed the build:dev Create a dev build from the pr label Oct 10, 2025
Comment on lines +92 to +93
if fg:
formatted_message = f"{emoji} {click.style(message, fg=fg)}" if emoji else click.style(message, fg=fg)
Copy link
Contributor

Choose a reason for hiding this comment

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

we can simplify the logic here:

Suggested change
if fg:
formatted_message = f"{emoji} {click.style(message, fg=fg)}" if emoji else click.style(message, fg=fg)
formatted_message = f"{level.value} " if level.value else ""
formatted_message += click.style(message, fg=fg) if fg else message

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