From cf30837951120bb27563054ab9aadd4ccf6fadbf Mon Sep 17 00:00:00 2001 From: Thiago de Arruda Date: Tue, 8 Jul 2014 11:03:18 -0300 Subject: api/events/msgpack: Insert log statements to improve debugging Also changed the default log level to INFO so developers won't end up with big log files without asking explicitly(DLOG statements were placed in really "hot" code) --- scripts/msgpack-gen.lua | 2 ++ 1 file changed, 2 insertions(+) (limited to 'scripts/msgpack-gen.lua') diff --git a/scripts/msgpack-gen.lua b/scripts/msgpack-gen.lua index 7f80d48114..c9b6018222 100644 --- a/scripts/msgpack-gen.lua +++ b/scripts/msgpack-gen.lua @@ -91,6 +91,7 @@ output:write([[ #include #include +#include "nvim/log.h" #include "nvim/os/msgpack_rpc.h" #include "nvim/os/msgpack_rpc_helpers.h" #include "nvim/api/private/helpers.h" @@ -133,6 +134,7 @@ for i = 1, #api.functions do output:write('static Object handle_'..fn.name..'(uint64_t channel_id, msgpack_object *req, Error *error)') output:write('\n{') + output:write('\n DLOG("Received msgpack-rpc call to '..fn.name..'(request id: %" PRIu64 ")", req->via.array.ptr[1].via.u64);') -- Declare/initialize variables that will hold converted arguments for j = 1, #fn.parameters do local param = fn.parameters[j] -- cgit