Navigation Menu

Skip to content

Commit

Permalink
Use "trace" as the log level of various messages
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Apr 9, 2015
1 parent c0a1388 commit 72ccece
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions lib/droonga-protocol/connection-pool.js
Expand Up @@ -165,8 +165,8 @@ ConnectionPool.prototype = {
return reject(error);
}
var result = JSON.parse(stdin.trim());
this._logger.debug('express-droonga-report-live-engine-hosts:');
this._logger.debug(result);
this._logger.trace('express-droonga-report-live-engine-hosts:');
this._logger.trace(result);
resolve(result.liveEngineNodes);
}).bind(this));
}).bind(this));
Expand Down
14 changes: 7 additions & 7 deletions lib/droonga-protocol/connection.js
Expand Up @@ -125,7 +125,7 @@ Connection.prototype._initReceiver = function() {
}).bind(this));

var tag = this.tag + '.message';
this._logger.debug('Connection._initReceiver %d (%s): %d %d:',
this._logger.trace('Connection._initReceiver %d (%s): %d %d:',
this._id, this.hostAndPort,
receiver._id, this.receivePort, tag);
this._receiver = receiver;
Expand All @@ -141,14 +141,14 @@ Connection.prototype._handleMessage = function(envelope) {
var inReplyTo = envelope.inReplyTo;
if (inReplyTo) {
delete this._sendingMessages[inReplyTo];
this._logger.debug('Connection._handleMessage.reply %d (%s):',
this._logger.trace('Connection._handleMessage.reply %d (%s):',
this._id, this.hostAndPort, envelope);
var errorCode = envelope.statusCode;
if (!errorCode || isSuccess(errorCode))
errorCode = null;
this.emit('reply:' + inReplyTo, errorCode, envelope);
} else {
this._logger.debug('Connection._handleMessage.message %d (%s):',
this._logger.trace('Connection._handleMessage.message %d (%s):',
this._id, this.hostAndPort, envelope);
this.emit(envelope.type, envelope);
}
Expand Down Expand Up @@ -210,7 +210,7 @@ Connection.prototype.emitMessage = function(type, body, callback, options) {
}

if (!this.receivePort) {
this._logger.debug('Connection.emitMessage %d (%s): ' +
this._logger.trace('Connection.emitMessage %d (%s): ' +
'Receiver is not initialized yet. ' +
'Given message will be sent later.',
this._id, this.hostAndPort);
Expand All @@ -219,7 +219,7 @@ Connection.prototype.emitMessage = function(type, body, callback, options) {
}

var id = createId();
this._logger.debug('Connection.emitMessage %d (%s):',
this._logger.trace('Connection.emitMessage %d (%s):',
this._id, this.hostAndPort);
var from = this.getRouteToSelf(options);
var envelope = {
Expand All @@ -238,7 +238,7 @@ Connection.prototype.emitMessage = function(type, body, callback, options) {
var event = 'reply:' + id;
var timeoutId;
this.once(event, (function(errorCode, response) {
this._logger.debug('Connection.emitMessage.reply %d (%s):',
this._logger.trace('Connection.emitMessage.reply %d (%s):',
this._id, this.hostAndPort, errorCode);
clearTimeout(timeoutId);
if (sendingMessages)
Expand Down Expand Up @@ -268,7 +268,7 @@ Connection.prototype.thenableEmitMessage = function(type, body, options) {
};

Connection.prototype._sendPendingMessages = function() {
this._logger.debug('Connection._sendPendingMessages %d (%s): ' +
this._logger.trace('Connection._sendPendingMessages %d (%s): ' +
'Send %d pending message(s).',
this._id, this.hostAndPort,
this._pendingMessages.length);
Expand Down

0 comments on commit 72ccece

Please sign in to comment.