[Groonga-commit] droonga/express-droonga at ec63179 [master] groonga load: log errors

Back to archive index

Kouhei Sutou null+****@clear*****
Fri Apr 25 11:44:00 JST 2014


Kouhei Sutou	2014-04-25 11:44:00 +0900 (Fri, 25 Apr 2014)

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

  Message:
    groonga load: log errors

  Modified files:
    lib/adapter/api/groonga.js

  Modified: lib/adapter/api/groonga.js (+8 -2)
===================================================================
--- lib/adapter/api/groonga.js    2014-04-25 11:26:17 +0900 (c00f0c9)
+++ lib/adapter/api/groonga.js    2014-04-25 11:44:00 +0900 (48a5ac9)
@@ -36,8 +36,14 @@ module.exports = {
         };
         connection.emit('add', message, function(error, message) {
           nResponses++;
-          if (!error && message) {
-            nAdded++;
+          if (error) {
+            // TODO: Output to error log file.
+            console.error("/d/load: failed to add a record", message);
+          } else {
+            var succeeded = message;
+            if (succeeded) {
+              nAdded++;
+            }
           }
           if (isEnd && nRecords == nResponses) {
             var statusCode = statusCodes.SUCCESS;
-------------- next part --------------
HTML����������������������������...
Download 



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