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

Prevent logging auto-setup #1305

Closed
vigenere23 opened this issue Mar 24, 2022 · 3 comments · Fixed by #1372
Closed

Prevent logging auto-setup #1305

vigenere23 opened this issue Mar 24, 2022 · 3 comments · Fixed by #1372
Labels
type: enhancement Indicates new feature requests

Comments

@vigenere23
Copy link

vigenere23 commented Mar 24, 2022

Is your feature request related to a problem? Please describe.

When importing anything from Rubrik, it automatically setups the Python logging, which surpress any configuration I might have done. This is currently done at line 70 of __init__.py with the command configure_logging().

Describe the solution you'd like

I would like to be able to manually setup the logging if needed, instead of having it be done automatically on import. For example, calling rubrix.configure_logging() manually in my script.

Describe alternatives you've considered

I've tried configuring my logging after the import of Rubrix, but it still doesn't work. I've also tried importing the classes directly (like Text2TextRecord) without using the singleton from the __init__,py, but it still doesn't work.

@vigenere23 vigenere23 added the type: enhancement Indicates new feature requests label Mar 24, 2022
@frascuchon
Copy link
Member

frascuchon commented Mar 25, 2022

Hi @vigenere23 and thanks for reaching out.

If you are not using logoru for your logging configuration, you could uninstall it. Then rubrix won't do the auto-loggin configuration.

See here

@vigenere23
Copy link
Author

vigenere23 commented Mar 28, 2022

Thanks for the info :) That does work, but I think it's still not ideal to prevent the logging (requires a manual step after each installation).

@frascuchon
Copy link
Member

Totally true! loguru should be an optional dependency.

Thanks for your feedback. I've created an issue for that #1331

@dcfidalgo dcfidalgo linked a pull request Apr 1, 2022 that will close this issue
frascuchon pushed a commit that referenced this issue Apr 11, 2022
Closes #1331
Closes #1305

(cherry picked from commit 7ce45b8)
frascuchon pushed a commit that referenced this issue Apr 11, 2022
Closes #1331
Closes #1305

(cherry picked from commit 7ce45b8)

- refactor: avoid a lot of warning related to advanded_query_dsl parsing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement Indicates new feature requests
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants