summaryrefslogtreecommitdiff
path: root/script/proto
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-04-05 23:03:16 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-04-05 23:03:16 +0800
commitc0cf9ae2835f9a19fe6a9af743ddd24be7c3a123 (patch)
tree503bec02eaffff462aa23f5cbb92af2983a6036c /script/proto
parent8422502419f2a5138c2772aea60111fa7e9599aa (diff)
downloadlua-language-server-c0cf9ae2835f9a19fe6a9af743ddd24be7c3a123.zip
#1018 cleanup logs
Diffstat (limited to 'script/proto')
-rw-r--r--script/proto/proto.lua8
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