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
@@ -1,3 +1,7 @@
1
+ 9.1.20
2
+ 1、没什么就是一个日志配置功能功能
3
+ 9.1.19
4
+ 1、尴尬修改的是9.18的问题
1
5
  9.1.18
2
6
  1、普通日志默认100个文件
3
7
  9.1.17
@@ -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
- backups: 100,
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
- backups: 100,
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 != "heartbeat") {
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
- backups: number;
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
- backups: number;
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cgserver",
3
- "version": "9.1.18",
3
+ "version": "9.1.20",
4
4
  "author": "trojan",
5
5
  "type": "commonjs",
6
6
  "description": "free for all.Websocket or Http",