Commit d024444c authored by mercury233's avatar mercury233

add log stderr

parent e035c61b
......@@ -416,6 +416,10 @@ class Room
log.info "AI stderr: " + data
return
return
@process.stderr.on 'data', (data)=>
log.info "YGOPRO stderr: " + data
@has_ygopro_error = true
return
catch
@error = "建立房间失败,请重试"
delete: ->
......@@ -448,6 +452,8 @@ class Room
recorded_ip.push player_ip
redisdb.lpush(player_ip+":replays", replay_id)
return
if @has_ygopro_error
log.info "error replay: R#" + replay_id
return
@watcher_buffers = []
@recorder_buffers = []
......
......@@ -556,6 +556,12 @@
}
};
})(this));
this.process.stderr.on('data', (function(_this) {
return function(data) {
log.info("YGOPRO stderr: " + data);
_this.has_ygopro_error = true;
};
})(this));
} catch (error1) {
this.error = "建立房间失败,请重试";
}
......@@ -588,6 +594,9 @@
recorded_ip.push(player_ip);
redisdb.lpush(player_ip + ":replays", replay_id);
});
if (this.has_ygopro_error) {
log.info("error replay: R#" + replay_id);
}
});
}
this.watcher_buffers = [];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment