couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dav...@apache.org
Subject svn commit: r1172375 - /couchdb/trunk/src/couch_index/src/couch_index.erl
Date Sun, 18 Sep 2011 21:50:50 GMT
Author: davisp
Date: Sun Sep 18 21:50:50 2011
New Revision: 1172375

URL: http://svn.apache.org/viewvc?rev=1172375&view=rev
Log:
Better lifetime error messages for couch_index.

Add a log message when the indexer exits as well as format the sig in
log messages has hex.


Modified:
    couchdb/trunk/src/couch_index/src/couch_index.erl

Modified: couchdb/trunk/src/couch_index/src/couch_index.erl
URL: http://svn.apache.org/viewvc/couchdb/trunk/src/couch_index/src/couch_index.erl?rev=1172375&r1=1172374&r2=1172375&view=diff
==============================================================================
--- couchdb/trunk/src/couch_index/src/couch_index.erl (original)
+++ couchdb/trunk/src/couch_index/src/couch_index.erl Sun Sep 18 21:50:50 2011
@@ -94,9 +94,9 @@ init({Mod, IdxState}) ->
             Args = [
                 Mod:get(db_name, IdxState),
                 Mod:get(idx_name, IdxState),
-                Mod:get(signature, IdxState)
+                couch_index_util:hexsig(Mod:get(signature, IdxState))
             ],
-            ?LOG_INFO("Opening index for db: ~s idx: ~s~n    sig: ~p", Args),
+            ?LOG_INFO("Opening index for db: ~s idx: ~s sig: ~p", Args),
             proc_lib:init_ack({ok, self()}),
             gen_server:enter_loop(?MODULE, [], State);
         Other ->
@@ -110,6 +110,13 @@ terminate(Reason, State) ->
     send_all(State#st.waiters, Reason),
     couch_util:shutdown_sync(State#st.updater),
     couch_util:shutdown_sync(State#st.compactor),
+    Args = [
+        Mod:get(db_name, IdxState),
+        Mod:get(idx_name, IdxState),
+        couch_index_util:hexsig(Mod:get(signature, IdxState)),
+        Reason
+    ],
+    ?LOG_INFO("Closing index for db: ~s idx: ~s sig: ~p~nreason: ~p", Args),
     ok.
 
 



Mime
View raw message