-
Notifications
You must be signed in to change notification settings - Fork 64
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
Disable logging? #25
Comments
Well, currently there is not. |
You can set the logger level to warning to ignore unnecessary messages.
|
Thank you for your answer but this does not seem to work 😿. Example codeimport logging
from usp.tree import sitemap_tree_for_homepage
logging.getLogger("usp.fetch_parse").setLevel(logging.WARNING)
logging.getLogger("usp.helpers").setLevel(logging.WARNING)
logging.getLogger("usp.tree").setLevel(logging.WARNING)
sitemap_tree_for_homepage('https://www.siemens.de/')
|
Thats because you are getting warning messages. If you want to ignore them too you need to set the logging level higher ( |
Ideally, it would be nice to have an official setting to suppress the output. |
Is there a way to turn off logging? A single call to
sitemap_tree_for_homepage
spits out over 20 messages into the console, most of which are of no concern.The text was updated successfully, but these errors were encountered: