gaia icon indicating copy to clipboard operation
gaia copied to clipboard

logs should include a fiber id

Open oriubimo opened this issue 5 years ago • 3 comments

It's very difficult to understand which fiber is outputting which log line.

oriubimo avatar Jan 28 '20 20:01 oriubimo

In which component?

romange avatar Jan 28 '20 20:01 romange

I'm not sure how to implement this, but ideally, let's say I have many fibers on the same thread, and they are all printing stuff to log. There should be an easy way to differentiate between them, and it would be nice if instead of having the programmer forced to think about it, it would be provided by the logging system.

oriubimo avatar Jan 28 '20 21:01 oriubimo

https://github.com/romange/gaia/blob/0262f4906f95a821a6eeb0a1c637b2516fac06e4/util/fibers/fibers_ext.h#L32

Contains an auxiliary method for outputting the id. In addition you can output fiber name.

I sometimes introduce fiber aware logging macros in gaia code but i think its wrong to assume fiber dependency in the logging module.

On Tue, Jan 28, 2020, 23:01 Ori Brostovski [email protected] wrote:

I'm not sure how to implement this, but ideally, let's say I have many fibers on the same thread, and they are all printing stuff to log. There should be an easy way to differentiate between them, and it would be nice if instead of having the programmer forced to think about it, it would be provided by the logging system.

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/romange/gaia/issues/52?email_source=notifications&email_token=AA4BFCBMWUV5CSDGLPDJ53LRACMLRA5CNFSM4KMYNHTKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKE4H7I#issuecomment-579453949, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA4BFCFAMUPZVGPTFFXHGC3RACMLRANCNFSM4KMYNHTA .

romange avatar Jan 28 '20 21:01 romange