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

errors are unconditionally logged to terminal #68

Open
vmpjdc opened this issue Jul 2, 2020 · 2 comments
Open

errors are unconditionally logged to terminal #68

vmpjdc opened this issue Jul 2, 2020 · 2 comments

Comments

@vmpjdc
Copy link

vmpjdc commented Jul 2, 2020

While writing some code against our Mattermost, I discovered that exceptions are being logged, even though my code is handling them. For example, ResourceNotFound wrote the following to my terminal:

Unable to find an existing account matching your username for this team. This team may require an invite from the team owner to join.

My script dealt with the situation, and so this logging is unwanted noise.

@Vaelor
Copy link
Owner

Vaelor commented Jul 2, 2020

Mhh, I get your point. What do you think would be a good solution for that?
Would you be okay if you had an option like, dont log errors or rather a log anything at all?

I think, keeping the log.error active by default helps people to spot problems faster, so I would prefer an option to disable the output.

@thmo
Copy link

thmo commented Aug 28, 2021

One option, as a user of mattermostdriver, is to disable the logger by setting

logging.getLogger('mattermostdriver.websocket').disabled = True

On a related note, it would be good to have a common ancestor for all exceptions thrown.

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

3 participants