atlassian-api / atlassian-python-api

Atlassian Python REST API wrapper
https://atlassian-python-api.readthedocs.io
Apache License 2.0
1.29k stars 642 forks source link

Unnecessary warning messages #1335

Open celalsahin opened 4 months ago

celalsahin commented 4 months ago

Hello!

Warning level logging is way too chatty even in %100 success cases. There are multiple examples where the method attempts what it exactly needs to do - but library still prints a warning log. Some examples are:

https://github.com/atlassian-api/atlassian-python-api/blob/master/atlassian/jira.py#L1344 https://github.com/atlassian-api/atlassian-python-api/blob/master/atlassian/jira.py#L1394 https://github.com/atlassian-api/atlassian-python-api/blob/master/atlassian/jira.py#L1400 ...

So from my POV if a method does an update of an issue, it is not a warning that it is updating an issue - am I somewhat wrong?

Thanks! Celal

Gerolf-Reinwardt commented 4 months ago

I see it the same way, this should never be more then an info, maybe just trace/debug. Library users, who call the API multiple times (may by an automatism, that updates 500 issues), get flooded with warnings, which are none. So finding the real problems gets hard.

gkowalc commented 4 months ago

It some cases these warnings make sense for example in confluence.py: @deprecated(version="2.4.2", reason="Use get_all_restrictions_for_content()") def get_all_restictions_for_content(self, content_id): """Let's use the get_all_restrictions_for_content()""" log.warning("Please, be informed that is deprecated as typo naming") but on many others it can indeed create a bit of noise. I would opt for lowering logging level for these informational message to 'info' logging level so that people can easily filter them out and only log warnings/errors levels.

Spacetown commented 4 months ago

This warning doesn't make sense sind python warns already about the deprecation.