Skip to content

Set logging level to error in error mail handler #6577

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

Merged
merged 1 commit into from
Dec 21, 2021

Conversation

Zharktas
Copy link
Member

@Zharktas Zharktas commented Dec 7, 2021

Proposed fixes:

Error email handler sends an email for example Permission denied errors, it doesn't have a stack trace as those where removed in #6345, it just produces following email:

Time:               2021-12-07 08:13:21,716
URL:                /user/activity/test-user
Method:             GET
IP:                 127.0.0.1
Headers:            Cookie: _pk_id.19.5949=9a0143ef0e614333.1638863250.; _pk_ses.19.5949=1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36
Connection: close
Host: vagrant.avoindata.fi
Upgrade-Insecure-Requests: 1
Cache-Control: max-age=0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
X-Url-Scheme: http
Accept-Language: fi-FI,fi;q=0.9
Accept-Encoding: gzip, deflate

This PR sets logging level in mail handler to error so that these won't get logged and emailed to admins.

Features:

  • includes tests covering changes
  • includes updated documentation
  • includes user-visible changes
  • includes API changes
  • includes bugfix for possible backport

Please [X] all the boxes above that apply

@smotornyuk smotornyuk self-assigned this Dec 7, 2021
@Zharktas
Copy link
Member Author

Zharktas commented Dec 7, 2021

This probably fixes #6524 as well, as it seems to be the same issue.

@stefina
Copy link
Member

stefina commented Dec 9, 2021

We applied this patch to our CKAN-Version (2.9.4) and are now no longer receiving those E-Mails for every Web-Asset, thank you! Hope this gets merged soon :)

@smotornyuk smotornyuk linked an issue Dec 21, 2021 that may be closed by this pull request
@smotornyuk smotornyuk merged commit 5a55c77 into master Dec 21, 2021
@smotornyuk smotornyuk deleted the set_logging_level_to_error_in_error_emails branch December 21, 2021 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Application Error email for every web asset fetched
4 participants