Use logging.LoggerAdapter instead of "MDC" object to keep job_id in log records

Bug #827350 reported by Anton Gritsay
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenQuake (deprecated)
Won't Fix
Low
Anton Gritsay

Bug Description

Instead of (not thread-safe) "MDC" object attached to handler class we may use standard way for that use-case: LoggerAdapter: http://docs.python.org/library/logging.html#loggeradapter-objects

Revision history for this message
Muharem Hrnjadovic (al-maisan) wrote :
Anton Gritsay (angri)
Changed in openquake:
assignee: nobody → Anton Gritsay (angri)
status: New → In Progress
Anton Gritsay (angri)
Changed in openquake:
importance: Undecided → Low
milestone: none → 0.4.3
John Tarter (toh2)
Changed in openquake:
milestone: 0.4.3 → 0.4.4
John Tarter (toh2)
Changed in openquake:
milestone: 0.4.4 → 0.4.5
Revision history for this message
Anton Gritsay (angri) wrote :

That appeared to be bad idea after all. The requirement (access to job id in log records) was achieved with "MDC" in handler class (the way it used to be).

Changed in openquake:
milestone: 0.4.5 → 0.4.4
status: In Progress → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.