tarpas / pytest-testmon

Selects tests affected by changed files. Executes the right tests first. Continuous test runner when used with pytest-watch.
https://testmon.org
MIT License
800 stars 54 forks source link

get_logger: only configure the logger passed instead of the root logger #229

Closed fkaleo closed 4 months ago

fkaleo commented 7 months ago

At the moment as soon as get_logger is called in testmon logging is configured globally (the root logger is) which impacts every user of pytest that installs pytest-testmon even if pytest-testmon is not enabled.

As a result, test suites print out many log lines that often would not have been printed out, with an unexpected formatting.

This PR fixes it by only configuring the logger passed to get_logger instead of the root logger.

tarpas commented 6 months ago

Thanks a lot. I don't have a plan to release in the coming days so don't hold your breath please, but it shouldn't take too many weeks either.

tallpress commented 4 months ago

Hey @tarpas, is there any chance this makes it in the next release?

tarpas commented 4 months ago

There is a good chance, thanks for reminding :)