BaiZhanChengShenLog.lua 440 B

123456789101112131415
  1. -- 百战成神专用日志(文件 log/oss_bzcs, 见 common.Log LOGID_OSS_BZCS)
  2. local Log = require("common.Log")
  3. function write(logStr)
  4. Log.write(Log.LOGID_OSS_BZCS, logStr or "")
  5. end
  6. -- action 为业务动作名, detail 为键值描述串
  7. function logAction(action, detail)
  8. if detail and detail ~= "" then
  9. write(string.format("[%s] %s", action, detail))
  10. else
  11. write(string.format("[%s]", action))
  12. end
  13. end