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

Stop using a global logger? #692

Closed
skateinmars opened this issue Jun 30, 2023 · 1 comment
Closed

Stop using a global logger? #692

skateinmars opened this issue Jun 30, 2023 · 1 comment
Labels

Comments

@skateinmars
Copy link

Hello,

I have been trying to integrate venom as a library in our tooling, but I have come across issues when trying to run scenarios in parallel

Unfortunately, when calling InitLogger() on a venom.Venom struct, the global logrus logger also gets reset and replaced (with the log output file also being overridden).
The obvious solution seems to be adding a logrus field to the Venom struct

Obviously this global logger is used everywhere in code and executors (via the global funcs), so replacing this usage may be time consuming. So the question is, do you believe this work is worth doing to improve the usage of venom as a library?

@yesnault
Copy link
Member

Hi, if this request is still relevant (sorry for the response time on the subject), can you provide a example of unit test trying using venom as libary please?

Initialy, venom was designed to be used in unit test, this is no longer supported now. But perhaps we can try something to make it works, without impacting all existing logger calls.

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

No branches or pull requests

2 participants