Преглед изворни кода

Fix Lua syntax - simplify debug functions

Luis Rosales пре 2 месеци
родитељ
комит
d57c77f6a9
1 измењених фајлова са 3 додато и 6 уклоњено
  1. 3 6
      package/src/client2server-unified.lua

+ 3 - 6
package/src/client2server-unified.lua

@@ -100,18 +100,15 @@ local function log_debug(msg)
 end
 local function log_send(event_type, data)
     if cfg.debug then
-        local s = data:gsub("\"", "\\"")
-        if #s > 200 then s = s:sub(1, 200) .. "..." end
-        log("debug", "SEND " .. event_type .. ": " .. s)
+        log("debug", "SEND " .. event_type)
     end
 end
 local function log_recv(data)
     if cfg.debug then
-        local s = data:gsub("\"", "\\"")
-        if #s > 200 then s = s:sub(1, 200) .. "..." end
-        log("debug", "RECV data")
+        log("debug", "RECV")
     end
 end
+end
 
 -- ============================================================================
 -- JSON