suppress some routine server logs
parent
7f22da0f57
commit
68a77885d4
|
@ -16,11 +16,14 @@ module.exports.create = function (config) {
|
|||
.on('channelOpen', historyKeeper.channelOpen)
|
||||
.on('sessionClose', function (userId, reason) {
|
||||
if (['BAD_MESSAGE', 'SOCKET_ERROR', 'SEND_MESSAGE_FAIL_2'].indexOf(reason) !== -1) {
|
||||
if (reason && reason.code === 'ECONNRESET') { return; }
|
||||
return void log.error('SESSION_CLOSE_WITH_ERROR', {
|
||||
userId: userId,
|
||||
reason: reason,
|
||||
});
|
||||
}
|
||||
|
||||
if (reason && reason === 'SOCKET_CLOSED') { return; }
|
||||
log.verbose('SESSION_CLOSE_ROUTINE', {
|
||||
userId: userId,
|
||||
reason: reason,
|
||||
|
|
Loading…
Reference in New Issue