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

Feature request: Have an option to remove special characters #9

Closed
Lyaaaaaaaaaaaaaaa opened this issue Aug 9, 2024 · 2 comments
Closed

Comments

@Lyaaaaaaaaaaaaaaa
Copy link

Hello,
I have a new suggestion. It would be great to be able to disable all formatting of the logs.

More details

In the project settings, you can change the format of the logs. I found some tags (colors I think) inside it. So, I removed them from addons/logger/log_message_format.
But, it keeps adding tags before and after. These tags, while I understand their usage, see screenshot, can be annoying for readability when you work on text files.
logs

Here is an example of what it looks like in TXT format (the format I actually have to browse when an end user has a problem. They don't send a screenshot of a console but a dirty log file).

Main/INFO 11:48:53 setting log level to INFO�[0m
Main/INFO 11:48:53 setting log level to DEBUG�[0m
�[90mMain/DEBUG 11:48:53 grant_executable_permission()�[39m�[0m
�[90mMain/DEBUG 11:48:53 check_os()�[39m�[0m
Main/INFO 11:48:53 Checking the os and its architecture�[0m
�[90mMain/DEBUG 11:48:53 Architecture: 64 bits�[39m�[0m
�[90mMain/DEBUG 11:48:53 check_previous_install�[39m�[0m
Main/INFO 11:48:53 Checking the previous installation�[0m
Main/INFO 11:48:53 Found a valid previous install.�[0m
�[90mMain/DEBUG 11:48:56 Is cuda enabled: false"start_installation"�[39m�[0m
�[90mMain/DEBUG 11:48:56 move_env_config�[39m�[0m
Main/INFO 11:48:56 Coping conda environment config file to user://�[0m
Main/INFO 11:48:56 Copied res://conda_config.yml to user://conda_config.yml�[0m
�[90mMain/DEBUG 11:48:56 _create_config�[39m�[0m
Main/INFO 11:48:56 Creating the config file.�[0m
Main/INFO 11:48:56 Successfully created the config file.�[0m
USER ERROR: Attempting to make child window exclusive, but the parent window already has another exclusive child. This window: /root/Installer/WaitDialog, parent window: /root, current exclusive child window: /root/Installer/CudaPopUp
   at: _set_transient_exclusive_child (scene/main/window.cpp:890)
�[90mMain/DEBUG 11:48:56 install_mamba�[39m�[0m
Main/INFO 11:48:56 Installing mamba�[0m
Main/INFO 11:49:15 Successfully installed mamba�[0m
�[90mMain/DEBUG 11:49:15 

While it's not ruining the logs, it makes them a bit less readable. That's why, I think an option to remove all tags could be nice.

@albinaask
Copy link
Owner

Seems like a very useful feature indeed! I'll add it to the list!

albinaask added a commit that referenced this issue Aug 10, 2024
- Fixes #8 & #9
- Cleans up the _internal_log method.
@albinaask
Copy link
Owner

It seems to me that Godot dumps data into the log file that shouldn't be there if one uses the print_rich method. I've made a workaround that should fix it for all exported projects. The issue persists if the user has the editor open, so you should get the same problem on your end only, bu when you get a log from another user, it should be fine... I could have added an option to force no colors, but thought it was a non essential feature, and since a message takes a whapping 200us on my end, I really don't want to add any more if statements until I've converted the code into GDExtension...

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

No branches or pull requests

2 participants