Skip to content

feat: improve / clean up logging#7591

Merged
rjsparks merged 12 commits into
ietf-tools:mainfrom
jennifer-richards:logging
Jun 26, 2024
Merged

feat: improve / clean up logging#7591
rjsparks merged 12 commits into
ietf-tools:mainfrom
jennifer-richards:logging

Conversation

@jennifer-richards

Copy link
Copy Markdown
Member
  • Include more fields in JSON logs
  • Extract gunicorn access log fields in JSON
  • Put all gunicorn logs on stdout, leave django logs on stderr
  • Replace syslog with Python logging (or remove the messages)

rjsparks
rjsparks previously approved these changes Jun 26, 2024
The gunicorn logger plays tricks with the
LogRecord args parameter to let it have string
keys instead of being a simple tuple.
The mypy tests rightly flag this. Rather
than fighting the typing, just remove the
hints and leave a comment warning not to
use the gunicorn-specific formatter with
other loggers.
@codecov

codecov Bot commented Jun 26, 2024

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 41.66667% with 14 lines in your changes missing coverage. Please review.

Project coverage is 88.79%. Comparing base (187c2c5) to head (4571952).
Report is 274 commits behind head on main.

Files Patch % Lines
ietf/utils/jsonlogger.py 35.00% 13 Missing ⚠️
ietf/wsgi.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7591      +/-   ##
==========================================
- Coverage   88.98%   88.79%   -0.19%     
==========================================
  Files         291      295       +4     
  Lines       40717    41270     +553     
==========================================
+ Hits        36233    36647     +414     
- Misses       4484     4623     +139     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rjsparks
rjsparks merged commit 6a96a69 into ietf-tools:main Jun 26, 2024
@jennifer-richards
jennifer-richards deleted the logging branch June 27, 2024 12:47
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Jul 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants