diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-04-05 23:03:16 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-04-05 23:03:16 +0800 |
commit | c0cf9ae2835f9a19fe6a9af743ddd24be7c3a123 (patch) | |
tree | 503bec02eaffff462aa23f5cbb92af2983a6036c /script/proto | |
parent | 8422502419f2a5138c2772aea60111fa7e9599aa (diff) | |
download | lua-language-server-c0cf9ae2835f9a19fe6a9af743ddd24be7c3a123.zip |
#1018 cleanup logs
Diffstat (limited to 'script/proto')
-rw-r--r-- | script/proto/proto.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/script/proto/proto.lua b/script/proto/proto.lua index 83a188f9..cb549764 100644 --- a/script/proto/proto.lua +++ b/script/proto/proto.lua @@ -12,14 +12,14 @@ local function logSend(buf) if not RPCLOG then return end - log.debug('rpc send:', buf) + log.info('rpc send:', buf) end local function logRecieve(proto) if not RPCLOG then return end - log.debug('rpc recieve:', json.encode(proto)) + log.info('rpc recieve:', json.encode(proto)) end local m = {} @@ -167,8 +167,8 @@ function m.doMethod(proto) -- 任务可能在执行过程中被中断,通过close来捕获 local response <close> = function () local passed = os.clock() - clock - if passed > 0.2 then - log.debug(('Method [%s] takes [%.3f]sec. %s'):format(method, passed, util.dump(proto, secretOption))) + if passed > 0.5 then + log.warn(('Method [%s] takes [%.3f]sec. %s'):format(method, passed, util.dump(proto, secretOption))) end --log.debug('Finish method:', method) if not proto.id then |