Patches item #7592, was opened at 2007-01-05 23:50
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=1700&aid=7592&group_id=426

Category: None
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: John Mettraux (jmettraux)
Assigned to: Nobody (None)
Summary: logger.rb : adding Thread.current.object_id output

Initial Comment:
When developping with threads it is often useful to know which thread instance emits a given logĦĦmessage.

This patch to logger.rb produces logs like this one :

---8<---

D, [2007-01-05T23:21:06.370705 #3199 t101320] DEBUG -- OpenWFEru::ExpressionPool
 'expressionPool': apply()  (fei 0.9.2 engine/engine field:__definition con 1 11
68006866369 concurrence 0.0)
D, [2007-01-05T23:21:06.370925 #3199 t101320] DEBUG -- OpenWFEru::ExpressionPool
 'expressionPool': fetch_engine_environment() stored new ee
D, [2007-01-05T23:21:06.372050 #3199 t3394668] DEBUG -- OpenWFEru::ExpressionPoo
l 'expressionPool': apply()  (fei 0.9.2 engine/engine field:__definition con 1 1
168006866369 print 0.0.0)

--->8---

where the number following the 't' char is given by Thread.current.object_id


Maybe that would interest other people.

I produced the patch against the latest trunk version of logger.rb, it works well with my macosx default ruby install.


best regards, kotoshi yoroshiku oneigashimasu,

John

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=1700&aid=7592&group_id=426