Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes to logger output (colored, new level, stack trace) #29

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

andreas-paul
Copy link

This PR makes changes to the output:

  • Colored by level
  • New level "SUCCESS" (green)
  • Showing module/file from which Logger call originates (automated)

image

… output showing module from which call originated
@Calinou
Copy link
Member

Calinou commented Apr 10, 2024

ANSI escape codes from print_rich()'s BBCode-to-ANSI conversion are currently written to log files, so this will make them a lot harder to read when viewed in a text editor.

@andreas-paul
Copy link
Author

@Calinou Can you show an example? The print_rich statement is only used in the print strategy, not for the external sink strategy.

@Zireael07
Copy link

I <3 showing the source file <3

@andreas-paul
Copy link
Author

andreas-paul commented Apr 11, 2024

Can you please add a screenshot of the output (sensitive info removed), and your Godot Logger configuration? This will help me trace the issue. Thanks!

Edit: Output to logfile looks fine for me:
image

Considering that as mentioned above print_rich is not used for the logfiles, only the stack trace, I'm unable to recreate this issue.

@Calinou
Copy link
Member

Calinou commented Apr 11, 2024

Considering that as mentioned above print_rich is not used for the logfiles, only the stack trace, I'm unable to recreate this issue.

I thought this add-on relied on RotatedFileLogger (i.e. Godot's built-in file logging behavior) writing the raw stdout to disk. Since it uses a different approach, I guess it's fine to use color codes right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants