cgserver 9.1.18 → 9.1.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -116,7 +116,7 @@ class FrameworkConfig extends Config_1.Config {
|
|
|
116
116
|
filename: "./logs/log_date/date",
|
|
117
117
|
alwaysIncludePattern: true,
|
|
118
118
|
pattern: "yyyy-MM-dd-hh.log",
|
|
119
|
-
|
|
119
|
+
numBackups: 100,
|
|
120
120
|
},
|
|
121
121
|
client_log_file: {
|
|
122
122
|
category: "log_file",
|
|
@@ -131,7 +131,7 @@ class FrameworkConfig extends Config_1.Config {
|
|
|
131
131
|
filename: "./logs/client_log_date/date",
|
|
132
132
|
alwaysIncludePattern: true,
|
|
133
133
|
pattern: "yyyy-MM-dd.log",
|
|
134
|
-
|
|
134
|
+
numBackups: 100,
|
|
135
135
|
},
|
|
136
136
|
error_log_file: {
|
|
137
137
|
category: "error_log_file",
|
|
@@ -61,6 +61,10 @@ class IWebSocket {
|
|
|
61
61
|
}
|
|
62
62
|
return false;
|
|
63
63
|
}
|
|
64
|
+
_nodebugmsgs = {
|
|
65
|
+
"heartbeat": true,
|
|
66
|
+
"ping": true
|
|
67
|
+
};
|
|
64
68
|
constructor(protoType = IProtoFilter_1.EProtoType.Json, protoPath = "") {
|
|
65
69
|
this._socket_id = parseInt(_.uniqueId());
|
|
66
70
|
this._protoType = protoType;
|
|
@@ -127,7 +131,7 @@ class IWebSocket {
|
|
|
127
131
|
Log_1.GLog.error({ tipKey: this.tipKey, action: "receive", error: "no cmd", msg });
|
|
128
132
|
return false;
|
|
129
133
|
}
|
|
130
|
-
if (this._debug_msg && msg.cmd
|
|
134
|
+
if (this._debug_msg && !this._nodebugmsgs[msg.cmd]) {
|
|
131
135
|
Log_1.GLog.info({ tipKey: this.tipKey, action: "receive", msg });
|
|
132
136
|
}
|
|
133
137
|
if (!msg.cmd) {
|
|
@@ -156,7 +160,7 @@ class IWebSocket {
|
|
|
156
160
|
else {
|
|
157
161
|
await Core_1.core.safeCall(func, this, jsonData);
|
|
158
162
|
}
|
|
159
|
-
if (this._debug_msg) {
|
|
163
|
+
if (this._debug_msg && !this._nodebugmsgs[jsonData.cmd]) {
|
|
160
164
|
Log_1.GLog.info("[" + (Date.now() - time) + "ms] " + jsonData.cmd);
|
|
161
165
|
}
|
|
162
166
|
}
|
|
@@ -122,7 +122,7 @@ export declare class FrameworkConfig extends Config {
|
|
|
122
122
|
filename: string;
|
|
123
123
|
alwaysIncludePattern: boolean;
|
|
124
124
|
pattern: string;
|
|
125
|
-
|
|
125
|
+
numBackups: number;
|
|
126
126
|
};
|
|
127
127
|
client_log_file: {
|
|
128
128
|
category: string;
|
|
@@ -137,7 +137,7 @@ export declare class FrameworkConfig extends Config {
|
|
|
137
137
|
filename: string;
|
|
138
138
|
alwaysIncludePattern: boolean;
|
|
139
139
|
pattern: string;
|
|
140
|
-
|
|
140
|
+
numBackups: number;
|
|
141
141
|
};
|
|
142
142
|
error_log_file: {
|
|
143
143
|
category: string;
|
|
@@ -34,6 +34,9 @@ export declare class IWebSocket {
|
|
|
34
34
|
protected _ip: string;
|
|
35
35
|
get remoteHost(): string;
|
|
36
36
|
get connected(): boolean;
|
|
37
|
+
protected _nodebugmsgs: {
|
|
38
|
+
[cmd: string]: boolean;
|
|
39
|
+
};
|
|
37
40
|
constructor(protoType?: EProtoType, protoPath?: string);
|
|
38
41
|
getNewMsg(cmd: string, errcode?: {
|
|
39
42
|
id: number;
|