Actions
Story #2324
closedAs a user, I can see the first 8 characters of a task id in every log statement emitted from a running task
Start date:
Due date:
% Done:
100%
Estimated time:
Platform Release:
2.13.0
Groomed:
Yes
Sprint Candidate:
Yes
Tags:
Pulp 2
Sprint:
Sprint 14
Quarter:
Description
Problem¶
It can be challenging for a user to analyze Pulp logs. A user should be able to answer these questions:
1. What task did this log statement come from?
2. What are all the log statements emitted by a specific task?
Solution¶
To remedy this we will add the first 8 characters of the task ID within brackets to each log line emitted from within a running task. Note that celery logs the entire task id before the task is run, so even with us logging a limited portion of the task-id you can easily determine the entire task-id.
Taking an example from Comment 3, the contents of the log line would be:
[0ca4399c] Starting new HTTPS connection (1):
Actions
Appending 8 character task id to log output
Appending a 8 character task id to log output if there is a relevant task id.
fixes #2324 https://pulp.plan.io/issues/2324