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

refactor: clean up logging #7419

Merged
merged 5 commits into from
May 14, 2024
Merged

Conversation

jennifer-richards
Copy link
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
Copy link

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
9 checks passed
@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
2 participants