Skip to content

refactor: clean up logging#7419

Merged
rjsparks merged 5 commits intoietf-tools:mainfrom
jennifer-richards:json-logging
May 14, 2024
Merged

refactor: clean up logging#7419
rjsparks merged 5 commits intoietf-tools:mainfrom
jennifer-richards:json-logging

Conversation

@jennifer-richards
Copy link
Copy Markdown
Member

This brings in the logging changes made on feat/helm and feat/k8s and adjusts the log setup to be compatible with current production.

Strips out the UTILS_LOGGER_LEVEL mechanism that we're not currently using (explanation in the commit description).

Rather than bringing back the direct calls to syslog.syslog in the ietf.utils.log module, this keeps @rjsparks's change directing those logs to the datatracker logger. That logger is configured to go to syslog via the SysLogHandler.

A change on the k8s settings_local.py we deploy will be needed to do this:

LOGGING["loggers"]["django"]["handlers"] = ["console", "mail_admins"]
LOGGING["loggers"]["django.security"]["handlers"] = ["console"]
LOGGING["loggers"]["datatracker"]["handlers"] = ["console"]

which should preserve its current configuration.

rjsparks and others added 4 commits May 14, 2024 10:33
This is not used (there _is_ a setting for the
django.security logger in settings_local.py on
production, but it is redundant with the
settings.LOGGING configuration and is not doing
anything).
rjsparks
rjsparks previously approved these changes May 14, 2024
@codecov
Copy link
Copy Markdown

codecov Bot commented May 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.89%. Comparing base (187c2c5) to head (1e23fdc).
Report is 119 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7419      +/-   ##
==========================================
- Coverage   88.98%   88.89%   -0.09%     
==========================================
  Files         291      291              
  Lines       40717    41044     +327     
==========================================
+ Hits        36233    36488     +255     
- Misses       4484     4556      +72     

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

@rjsparks rjsparks merged commit 48e0aa2 into ietf-tools:main May 14, 2024
@jennifer-richards jennifer-richards deleted the json-logging branch May 15, 2024 13:45
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators May 22, 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