0
0
mirror of https://github.com/vim/vim.git synced 2025-09-29 04:34:16 -04:00

patch 8.2.4887: channel log does not show invoking a timer callback

Problem:    Channel log does not show invoking a timer callback.
Solution:   Add a ch_log() call.
This commit is contained in:
Bram Moolenaar
2022-05-06 14:59:04 +01:00
parent bc6f2bf78a
commit 9b334d5912
2 changed files with 16 additions and 0 deletions

View File

@@ -477,6 +477,16 @@ timer_callback(timer_T *timer)
typval_T rettv;
typval_T argv[2];
#ifdef FEAT_JOB_CHANNEL
if (ch_log_active())
{
callback_T *cb = &timer->tr_callback;
ch_log(NULL, "invoking timer callback %s",
cb->cb_partial != NULL ? cb->cb_partial->pt_name : cb->cb_name);
}
#endif
argv[0].v_type = VAR_NUMBER;
argv[0].vval.v_number = (varnumber_T)timer->tr_id;
argv[1].v_type = VAR_UNKNOWN;
@@ -484,6 +494,10 @@ timer_callback(timer_T *timer)
rettv.v_type = VAR_UNKNOWN;
call_callback(&timer->tr_callback, -1, &rettv, 1, argv);
clear_tv(&rettv);
#ifdef FEAT_JOB_CHANNEL
ch_log(NULL, "timer callback finished");
#endif
}
/*