Comparing version 1.3.1 to 1.4.0
@@ -76,3 +76,3 @@ 'use strict'; | ||
debug('connection closed'); | ||
this.state = AgentState.CLOSED; | ||
this.teardown(); | ||
this.reconnect(); | ||
@@ -83,3 +83,3 @@ }; | ||
debug('get an error: %s', err); | ||
this.state = AgentState.CLOSED; | ||
this.teardown(); | ||
this.reconnect(); | ||
@@ -134,2 +134,3 @@ }; | ||
} | ||
this.state = AgentState.CLOSED; | ||
this.conn.close(); | ||
@@ -163,3 +164,3 @@ }; | ||
if (params.result === 'REG_OK') { | ||
debug("register ok."); | ||
debug('register ok.'); | ||
this.state = AgentState.WORK; | ||
@@ -245,3 +246,3 @@ this.stopRegister(); | ||
debug('heartbeat missed %d times.', that.heartbeatMissCount); | ||
that.conn.close(); | ||
that.teardown(); | ||
return; | ||
@@ -248,0 +249,0 @@ } |
@@ -9,3 +9,3 @@ 'use strict'; | ||
var MAX_LINES = 200; // 最多200行数据 | ||
var MAX_LINES = 250; // 最多200行数据 | ||
var buffered = []; | ||
@@ -12,0 +12,0 @@ exports.logdir = ''; // 日志路径 |
{ | ||
"name": "agentx", | ||
"version": "1.3.1", | ||
"version": "1.4.0", | ||
"description": "agentx is powered by alinode", | ||
@@ -17,4 +17,4 @@ "scripts": { | ||
"debug": "*", | ||
"through2": "^0.6.5", | ||
"split2": "^0.2.1" | ||
"through2": "^2.0.0", | ||
"split2": "^2.0.0" | ||
}, | ||
@@ -28,3 +28,8 @@ "devDependencies": { | ||
"rewire": "~2.5.1" | ||
} | ||
}, | ||
"files": [ | ||
"lib", | ||
"client.js", | ||
"start_client.js" | ||
] | ||
} |
@@ -31,5 +31,19 @@ AgentX | ||
"heartbeatInterval": 60, | ||
"reportInterval": 60 | ||
"reportInterval": 60, | ||
"error_log": [ | ||
"</path/to/your/error.log>", | ||
"您的应用在业务层面产生的异常日志的路径", | ||
"例如:/root/.logs/error.#YYYY#-#MM#-#DD#.log", | ||
"可选" | ||
], | ||
"packages": [ | ||
"</path/to/your/package.json>", | ||
"可以输入多个package.json的路径", | ||
"可选" | ||
] | ||
} | ||
``` | ||
> 配置中的#YYYY#、#MM#、#DD#是通配符,如果您的异常日志是按时间生成的,请使用它。 | ||
保存为`config.json`。上述不明确的地方请咨询旺旺群:1406236180。 | ||
@@ -36,0 +50,0 @@ |
921
60
28141
14
8
+ Addedisarray@1.0.0(transitive)
+ Addedprocess-nextick-args@2.0.1(transitive)
+ Addedreadable-stream@2.3.8(transitive)
+ Addedsafe-buffer@5.1.2(transitive)
+ Addedsplit2@2.2.0(transitive)
+ Addedstring_decoder@1.1.1(transitive)
+ Addedthrough2@2.0.5(transitive)
+ Addedutil-deprecate@1.0.2(transitive)
- Removedisarray@0.0.1(transitive)
- Removedreadable-stream@1.0.34(transitive)
- Removedsplit2@0.2.1(transitive)
- Removedstring_decoder@0.10.31(transitive)
- Removedthrough2@0.6.5(transitive)
Updatedsplit2@^2.0.0
Updatedthrough2@^2.0.0