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

When running pytest use cases using Pytest-xDist multiprocesses. The color of the loguru log output from the console is all red. #1128

Open
lgrlucky opened this issue Apr 26, 2024 · 1 comment

Comments

@lgrlucky
Copy link

lgrlucky commented Apr 26, 2024

When running pytest use cases using Pytest-xDist multiprocesses. The color of the loguru log output from the console is all red,

but without using pytest-xdist, there is no problem with the color of the log in the console:
image

Here is my loguru configuration:
image

This is the corresponding package version
image

I have tried the combination of many versions, such as Pytest-xdist of 2.5.0 and pytest of 6.2.5 and 8.0.0, but nothing has changed.
If it is convenient, please help me see what the cause of this problem is, and it does not affect the function, but for OCD, the red log full screen makes me very uncomfortable .ThanK

@Delgan
Copy link
Owner

Delgan commented May 2, 2024

This is a problem with pytest or pytest-xidst.

In the code you shared, the format of the logger does not contain any color. Therefore, Loguru should not affect the colors of the Pytest output.

Maybe try by adding colorize=False to your sink configuration.

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