Skip to content

lib/tapi: stop logging jump set/remove at INFO by default - #15

Open
okt-konst wants to merge 1 commit into
ts-factory:mainfrom
okt-konst:up/tapi-jmp-log-level
Open

lib/tapi: stop logging jump set/remove at INFO by default#15
okt-konst wants to merge 1 commit into
ts-factory:mainfrom
okt-konst:up/tapi-jmp-log-level

Conversation

@okt-konst

Copy link
Copy Markdown
Collaborator

lib/tapi/tapi_jmp.c is the only file in the tree that defines
TE_LOG_LEVEL 0xff, which forces every log level on. As a result each
tapi_jmp_push() / tapi_jmp_pop() emitted an INFO line, and since every
TAPI_ON_JMP and CHECK_RC pushes a jump point, the log filled with a
set/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 actual
longjmp(), stays visible. Raising the level to include TE_LL_VERB
restores 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.

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>
@okt-konst
okt-konst force-pushed the up/tapi-jmp-log-level branch from 5031d22 to bc5517d Compare August 16, 2026 19:29
@arybchik

Copy link
Copy Markdown

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.

@k0nstantin

Copy link
Copy Markdown

As the second step I don't mind to make it VERB as long as it is available in logs (not dropped).

I was under impression that VERB is not in the logs by default.

@arybchik

Copy link
Copy Markdown

As the second step I don't mind to make it VERB as long as it is available in logs (not dropped).

I was under impression that VERB is not in the logs by default.

See the first step

@k0nstantin

Copy link
Copy Markdown

For the record - things are bad, because JS code that builds the HTML logs relies on the bloody setjump log. Because..... arr.

Thinking

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants