|
@@ -8,7 +8,7 @@ local root = {}
|
8
|
8
|
local function writeServerLog(key, date, data)
|
9
|
9
|
assert(key and date)
|
10
|
10
|
local file = string.format("%s-%s", key, date)
|
11
|
|
- skynet.send("statisticLog", "lua", "add_file_log", file, data)
|
|
11
|
+ skynet.send("statisticLog", "lua", "add_file_log", key, date, data)
|
12
|
12
|
end
|
13
|
13
|
|
14
|
14
|
function root.getActiveKey(date)
|
|
@@ -57,20 +57,22 @@ function root.logResource(uid, eventId, itemId, resChgs, resResult, channel, ban
|
57
|
57
|
local now = timeUtil.currentTime()
|
58
|
58
|
local date = timeUtil.toDate(now)
|
59
|
59
|
local dateStr = timeUtil.toString(now)
|
60
|
|
- local data = {
|
61
|
|
- date,
|
62
|
|
- dateStr,
|
63
|
|
- uid,
|
64
|
|
- bandShareCode,
|
65
|
|
- channel,
|
66
|
|
- eventId,
|
67
|
|
- itemId,
|
68
|
|
- resChgs or 0,
|
69
|
|
- resResult or 0
|
70
|
|
- }
|
71
|
|
- local dataStr = root.formatData(data)
|
72
|
60
|
|
73
|
|
- writeServerLog("resource", date, dataStr)
|
|
61
|
+ local cnt =
|
|
62
|
+ string.format(
|
|
63
|
+ "%s;%s;%s;%s;%s;%s;%s;%s;%s;",
|
|
64
|
+ tostring(date),
|
|
65
|
+ tostring(dateStr),
|
|
66
|
+ tostring(uid),
|
|
67
|
+ tostring(bandShareCode or ""),
|
|
68
|
+ tostring(channel),
|
|
69
|
+ tostring(eventId),
|
|
70
|
+ tostring(itemId),
|
|
71
|
+ tostring(resChgs or 0),
|
|
72
|
+ tostring(resResult or 0)
|
|
73
|
+ )
|
|
74
|
+
|
|
75
|
+ writeServerLog("resource", date, cnt)
|
74
|
76
|
end
|
75
|
77
|
|
76
|
78
|
-- 服务端注册埋点
|