[Groonga-commit] droonga/express-droonga at b748798 [master] Output errors in sub commands to the log

Back to archive index

YUKI Hiroshi null+****@clear*****
Sun Nov 30 20:33:17 JST 2014


YUKI Hiroshi	2014-11-30 20:33:17 +0900 (Sun, 30 Nov 2014)

  New Revision: b7487985c04c143dac58d78a3c44012f4b53ac53
  https://github.com/droonga/express-droonga/commit/b7487985c04c143dac58d78a3c44012f4b53ac53

  Message:
    Output errors in sub commands to the log

  Modified files:
    lib/droonga-protocol/connection-pool.js

  Modified: lib/droonga-protocol/connection-pool.js (+8 -2)
===================================================================
--- lib/droonga-protocol/connection-pool.js    2014-11-30 20:33:11 +0900 (d22bf12)
+++ lib/droonga-protocol/connection-pool.js    2014-11-30 20:33:17 +0900 (3a6778e)
@@ -150,8 +150,11 @@ ConnectionPool.prototype = {
           '--priority-hosts=' + this._initialHostNames.join(',')
       ].join(' ');
       exec(commandLine, function(error, stdin, stdout) {
-        if (error)
+        if (error) {
+          this._logger.error('express-droonga-report-live-engine-hosts:');
+          this._logger.error(stdin.trim());
           return reject(error);
+        }
         var result = JSON.parse(stdin.trim());
         this._logger.debug('express-droonga-report-live-engine-hosts:');
         this._logger.debug(result);
@@ -173,8 +176,11 @@ ConnectionPool.prototype = {
           '--hosts=' + this._initialHostNames.join(',')
       ].join(' ');
       exec(commandLine, function(error, stdin, stdout) {
-        if (error)
+        if (error) {
+          this._logger.error('express-droonga-join-to-cluster:');
+          this._logger.error(stdin.trim());
           return reject(error);
+        }
         resolve();
       });
     }).bind(this));
-------------- next part --------------
HTML����������������������������...
下載 



More information about the Groonga-commit mailing list
Back to archive index