Closed Bug 1318021 Opened 8 years ago Closed 5 years ago

Make the logging configuration more sensible

Categories

(Tree Management :: Treeherder, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: emorley, Unassigned)

References

Details

Attachments

(2 files)

There are several issues at present:
* The Vagrant environment uses a mixture of log files vs console, when it should just use the console to simplify development, and be consistent with Heroku
* The bin/run_* script logging levels are different from those in Procfile and from those obtained when using ./manage.py runserver.
* The Vagrant environment logging config comes from the git ignored settings_local.py, which isn't kept automatically up to date with changes in settings_local.example.py (since it's only copied over if it didn't exist already)

Resolving this blocks:
1) Switching from the bin/run* scripts to something that uses the Procfile (bug 1318020)
2) Removing settings_local.py (bug 1318011)
Comment on attachment 8813624 [details] [review]
[treeherder] mozilla:stop-logging-to-file > mozilla:master

This is only the first part of this bug, but the later parts are turning out to be fiddly, so splitting this off rather than hoarding yet more partly-finished branches locally :-)
Attachment #8813624 - Flags: review?(wlachance)
Comment on attachment 8813624 [details] [review]
[treeherder] mozilla:stop-logging-to-file > mozilla:master

Makes sense to me.
Attachment #8813624 - Flags: review?(wlachance) → review+
Commit pushed to master at https://github.com/mozilla/treeherder

https://github.com/mozilla/treeherder/commit/4df19bddd25e5e2edd38408157b53f9f34b5665e
Bug 1318021 - Vagrant: Stop using log files for gunicorn/celery output

Outputting to the console rather than a log file:
* is more user-friendly during development
* is more consistent with Heroku
* means the Vagrant-specific Django LOGGING config is now closer to the
one in settings.py, and so more easily combined with it

Both gunicorn and celery default to outputting to stdout/stderr, so the
`logfile` options can be omitted entirely.
No longer blocks: 1318011
Depends on: 1318011
Summary: Make the logging configuration more sane → Make the logging configuration more sensible
<jmaher> rwood: odd, no output, we should get some kind of print statement
<jmaher> rwood: I would expect to see this line: https://github.com/mozilla/treeherder/pull/2126/files#diff-8eaf98d45f731c643759d48de624bbf5R31
<rwood> jmaher: yep analyze_failures runs, but there's no output
...
<emorley> ah it's a .warn()?
<emorley> checking the log level [for prod] it's set to error and above (which doesn't seem sensible personally)
<emorley> https://github.com/mozilla/treeherder/blob/897bb5649b1b03c97e5f5b1da8c9600980f2f181/treeherder/config/settings.py#L182
<rwood> ahhh
<emorley> we should change that filter from error to warning
<emorley> prior to moving to Heroku it was such a pain to look at our logs that we didn't use them as much, so I guess this got missed
<emorley> sorry for the churn
<rwood> emorley: np! shall I make a quick bug and PR for that?
<emorley> yeah ty
<rwood> ok
<emorley> I think longer term we need to figure out what the log levels should really represent, and in what environments we have them set to what
<emorley> eg prod: warn and above, or info and above?
<emorley> but vagrant perhaps debug and above
<emorley> with an environment variable for overriding where needed temporarily
<emorley> And part of that, we'll need to adjust our logging calls so that there isn't too much noise at the wrong log level
<emorley> for example iirc the log parser outputs loads of lines at info() which would make that a bit too noisy as the prod default currently
<rwood> right, makes sense
<emorley> I can do this as part of bug 1318021
Depends on: 1336476
Assignee: emorley → nobody
Priority: P2 → P3
Attachment #8960956 - Flags: review?(cdawson)
Left a message in the review before r+'ing this.
Comment on attachment 8960956 [details] [review]
Link to GitHub pull-request: https://github.com/mozilla/treeherder/pull/3361

Clearing the review for now while waiting for the response to my question in the PR.  :)
Attachment #8960956 - Flags: review?(cdawson)
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: