lib/tapi: stop logging jump set/remove at INFO by default - #15
Conversation
tapi_jmp.c defined TE_LOG_LEVEL 0xff -- the only file in the tree with that debug leftover -- forcing every log level on, so each tapi_jmp_push()/tapi_jmp_pop() emitted an INFO "Set"/"Remove jump point" line. Every TAPI_ON_JMP / CHECK_RC (and pyte's PYTE_GUARD) pushes a jump point, so the log filled with a set/remove pair per guarded call -- overwhelming in pyte-based suites. Demote the two per-call traces to VERB and set the file level to TE_LL_INFO, keeping the rare "Jump from" trace (logged only on an actual longjmp) visible. To debug push/pop, raise the level to include TE_LL_VERB. Link: ts-factory#15 Tested-by: Konstantin Ushakov <konstantin.ushakov@oktet.tech> Signed-off-by: Konstantin Ushakov <konstantin.ushakov@oktet.tech>
5031d22 to
bc5517d
Compare
|
Defining TE_LOG_LEVEL is definitely ugly. However, these logs are very useful in C tests. Otherwise sometimes it is hard to understand what's going on. First of all I think it should be fixed to use TE_LOG() directly, drop TE_LOG_LEVEL define and keep INFO log level. As the second step I don't mind to make it VERB as long as it is available in logs (not dropped). Third more fine-grained control could be added to control these logs. |
I was under impression that VERB is not in the logs by default. |
See the first step |
|
For the record - things are bad, because JS code that builds the HTML logs relies on the bloody setjump log. Because..... arr. Thinking |
lib/tapi/tapi_jmp.cis the only file in the tree that definesTE_LOG_LEVEL 0xff, which forces every log level on. As a result eachtapi_jmp_push()/tapi_jmp_pop()emitted an INFO line, and since everyTAPI_ON_JMPandCHECK_RCpushes a jump point, the log filled with aset/remove pair per guarded call. It is particularly overwhelming in suites
that guard heavily.
This demotes the two per-call traces to VERB and sets the file level to
TE_LL_INFO. The rare "Jump from" trace, logged only on an actuallongjmp(), stays visible. Raising the level to includeTE_LL_VERBrestores the old behaviour when debugging push/pop is wanted.
Testing: engine and agent build clean, no new warnings; verified the
per-call lines disappear from the log while "Jump from" is retained.