All debug log entries end in same source code and line
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Medium
|
Alex Meade |
Bug Description
The introspection of the originating source code line for DEBUG log messages is useless, as it always indicates the source code line for the log.debug():
2012-01-23 22:37:21,324 DEBUG nova.utils [-] Attempting to grab semaphore "iptables" for method "apply"... from (pid=9163) debug /opt/stack/
2012-01-23 22:37:21,324 DEBUG nova.utils [-] Got semaphore "iptables" for method "apply"... from (pid=9163) debug /opt/stack/
2012-01-23 22:37:21,324 DEBUG nova.utils [-] Attempting to grab file lock "iptables" for method "apply"... from (pid=9163) debug /opt/stack/
2012-01-23 22:37:21,325 DEBUG nova.utils [-] Got file lock "iptables" for method "apply"... from (pid=9163) debug /opt/stack/
2012-01-23 22:37:21,325 DEBUG nova.utils [-] Running cmd (subprocess): sudo iptables-save -t filter from (pid=9163) debug /opt/stack/
Every single DEBUG line ends this way...
Changed in nova: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
Changed in nova: | |
milestone: | none → essex-4 |
status: | Fix Committed → Fix Released |
Changed in nova: | |
milestone: | essex-4 → 2012.1 |
The issue is that logging gets the current stack frame and then goes back to the previous one to get the information about what called the log method. Since this is the case, we cannot add any more calls to the stack between the calling of log.debug and it's calling of log._log.
At the moment we have one in the middle, I'll have a MP in a min to fix this.