diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2018-09-18 23:26:03 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2018-09-19 01:11:09 +0200 |
commit | 7c00b9efcafa9046f8226ce4650f1b9ad67243c9 (patch) | |
tree | 86725e120b2e906a0c4a64b2a2a7bf2c26a7666f /src | |
parent | b9bcfa9bc817aac07da266e12afb335f0b2b1737 (diff) | |
download | rneovim-7c00b9efcafa9046f8226ce4650f1b9ad67243c9.tar.gz rneovim-7c00b9efcafa9046f8226ce4650f1b9ad67243c9.tar.bz2 rneovim-7c00b9efcafa9046f8226ce4650f1b9ad67243c9.zip |
log: RPC, input, other events
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/generators/gen_api_dispatch.lua | 3 | ||||
-rw-r--r-- | src/nvim/msgpack_rpc/channel.c | 1 | ||||
-rw-r--r-- | src/nvim/os/input.c | 2 | ||||
-rw-r--r-- | src/nvim/os_unix.c | 1 | ||||
-rw-r--r-- | src/nvim/state.c | 6 |
5 files changed, 13 insertions, 0 deletions
diff --git a/src/nvim/generators/gen_api_dispatch.lua b/src/nvim/generators/gen_api_dispatch.lua index 15fcafb584..bd9650e4d1 100644 --- a/src/nvim/generators/gen_api_dispatch.lua +++ b/src/nvim/generators/gen_api_dispatch.lua @@ -190,6 +190,9 @@ for i = 1, #functions do output:write('Object handle_'..fn.name..'(uint64_t channel_id, Array args, Error *error)') output:write('\n{') + output:write('\n#if MIN_LOG_LEVEL <= DEBUG_LOG_LEVEL') + output:write('\n logmsg(DEBUG_LOG_LEVEL, "RPC: ", NULL, -1, true, "invoke '..fn.name..'");') + output:write('\n#endif') output:write('\n Object ret = NIL;') -- Declare/initialize variables that will hold converted arguments for j = 1, #fn.parameters do diff --git a/src/nvim/msgpack_rpc/channel.c b/src/nvim/msgpack_rpc/channel.c index c37dde341f..c6cfb1a9ce 100644 --- a/src/nvim/msgpack_rpc/channel.c +++ b/src/nvim/msgpack_rpc/channel.c @@ -358,6 +358,7 @@ static void handle_request(Channel *channel, msgpack_object *request) } } else { multiqueue_put(channel->events, on_request_event, 1, evdata); + DLOG("RPC: scheduled %.*s", method->via.bin.size, method->via.bin.ptr); } } diff --git a/src/nvim/os/input.c b/src/nvim/os/input.c index 599487c345..f62253cbce 100644 --- a/src/nvim/os/input.c +++ b/src/nvim/os/input.c @@ -351,6 +351,8 @@ static bool input_poll(int ms) blocking = true; multiqueue_process_events(ch_before_blocking_events); } + DLOG("blocking... events_enabled=%d events_pending=%d", events_enabled, + !multiqueue_empty(main_loop.events)); LOOP_PROCESS_EVENTS_UNTIL(&main_loop, NULL, ms, input_ready() || input_eof); blocking = false; diff --git a/src/nvim/os_unix.c b/src/nvim/os_unix.c index bd8a13e6c8..27660712da 100644 --- a/src/nvim/os_unix.c +++ b/src/nvim/os_unix.c @@ -153,6 +153,7 @@ void mch_exit(int r) free_all_mem(); #endif + ILOG("Nvim exit: %d", r); exit(r); } diff --git a/src/nvim/state.c b/src/nvim/state.c index 5921bd45bf..d75f4038ae 100644 --- a/src/nvim/state.c +++ b/src/nvim/state.c @@ -64,6 +64,12 @@ getkey: may_sync_undo(); } +#if MIN_LOG_LEVEL <= DEBUG_LOG_LEVEL + char *keyname = key == K_EVENT + ? "K_EVENT" : (char *)get_special_key_name(key, mod_mask); + DLOG("input: %s", keyname); +#endif + int execute_result = s->execute(s, key); if (!execute_result) { break; |