4 Commits

Author SHA1 Message Date
dandds
9ae20b4a2a JSON logging for Celery workers.
This enables JSON logging for Celery workers if the LOG_JSON conig value
is set. It uses the same JsonFormatter class used by the Flask
applications. That class has been updated in two ways:

- It takes a `source` kwarg to define the log source for the formatter.
- The `msg` attribute of the log record is formatted with any arguments
  that may have been passed. This is necessary for Celery to render task
  type, completion time, etc. into the log output.
2019-11-25 10:13:37 -05:00
dandds
d82fd46a3c Mock out g in logging utils test.
This gives us better test isolation. Previously, we were manually
setting `g.current_user` with a factory instance and not cleaning it up
properly, which could break later tests.
2019-05-28 15:04:03 -04:00
dandds
5d05c146d6 context filter for adding additional data to logs 2019-03-29 15:47:44 -04:00
dandds
34149de04d basic json log formatter 2019-03-29 14:05:26 -04:00