couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kxe...@apache.org
Subject couch-index commit: updated refs/heads/master to 7acb7d3
Date Wed, 24 Sep 2014 20:38:28 GMT
Repository: couchdb-couch-index
Updated Branches:
  refs/heads/master 9e638f684 -> 7acb7d370


Use couch_log instead of ?LOG_*


Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch-index/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch-index/commit/7acb7d37
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch-index/tree/7acb7d37
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch-index/diff/7acb7d37

Branch: refs/heads/master
Commit: 7acb7d370586ffc27291c3518cea18c51576c667
Parents: 9e638f6
Author: Alexander Shorin <kxepal@apache.org>
Authored: Wed Sep 24 15:42:32 2014 +0400
Committer: Alexander Shorin <kxepal@apache.org>
Committed: Thu Sep 25 00:38:16 2014 +0400

----------------------------------------------------------------------
 src/couch_index.erl           | 8 ++++----
 src/couch_index_compactor.erl | 6 +++---
 src/couch_index_updater.erl   | 6 +++---
 3 files changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch-index/blob/7acb7d37/src/couch_index.erl
----------------------------------------------------------------------
diff --git a/src/couch_index.erl b/src/couch_index.erl
index 40150b7..b44d351 100644
--- a/src/couch_index.erl
+++ b/src/couch_index.erl
@@ -116,7 +116,7 @@ init({Mod, IdxState}) ->
                 Mod:get(idx_name, IdxState),
                 couch_index_util:hexsig(Mod:get(signature, IdxState))
             ],
-            ?LOG_INFO("Opening index for db: ~s idx: ~s sig: ~p", Args),
+            couch_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 ->
@@ -136,7 +136,7 @@ terminate(Reason, State) ->
         couch_index_util:hexsig(Mod:get(signature, IdxState)),
         Reason
     ],
-    ?LOG_INFO("Closing index for db: ~s idx: ~s sig: ~p~nreason: ~p", Args),
+    couch_log:info("Closing index for db: ~s idx: ~s sig: ~p~nreason: ~p", Args),
     ok.
 
 
@@ -250,7 +250,7 @@ handle_cast({new_state, NewIdxState}, State) ->
         Mod:get(idx_name, NewIdxState),
         CurrSeq
     ],
-    ?LOG_DEBUG("Updated index for db: ~s idx: ~s seq: ~B", Args),
+    couch_log:debug("Updated index for db: ~s idx: ~s seq: ~B", Args),
     Rest = send_replies(State#st.waiters, CurrSeq, NewIdxState),
     case State#st.committed of
         true -> erlang:send_after(Delay, self(), commit);
@@ -353,7 +353,7 @@ handle_info(maybe_close, State) ->
     end;
 handle_info({'DOWN', _, _, _Pid, _}, #st{mod=Mod, idx_state=IdxState}=State) ->
     Args = [Mod:get(db_name, IdxState), Mod:get(idx_name, IdxState)],
-    ?LOG_INFO("Index shutdown by monitor notice for db: ~s idx: ~s", Args),
+    couch_log:info("Index shutdown by monitor notice for db: ~s idx: ~s", Args),
     catch send_all(State#st.waiters, shutdown),
     {stop, normal, State#st{waiters=[]}}.
 

http://git-wip-us.apache.org/repos/asf/couchdb-couch-index/blob/7acb7d37/src/couch_index_compactor.erl
----------------------------------------------------------------------
diff --git a/src/couch_index_compactor.erl b/src/couch_index_compactor.erl
index 10c3e14..14ff6a0 100644
--- a/src/couch_index_compactor.erl
+++ b/src/couch_index_compactor.erl
@@ -99,16 +99,16 @@ compact(Parent, Mod, IdxState) ->
 compact(Idx, Mod, IdxState, Opts) ->
     DbName = Mod:get(db_name, IdxState),
     Args = [DbName, Mod:get(idx_name, IdxState)],
-    ?LOG_INFO("Compaction started for db: ~s idx: ~s", Args),
+    couch_log:info("Compaction started for db: ~s idx: ~s", Args),
     {ok, NewIdxState} = couch_util:with_db(DbName, fun(Db) ->
         Mod:compact(Db, IdxState, Opts)
     end),
     ok = Mod:commit(NewIdxState),
     case gen_server:call(Idx, {compacted, NewIdxState}) of
         recompact ->
-            ?LOG_INFO("Compaction restarting for db: ~s idx: ~s", Args),
+            couch_log:info("Compaction restarting for db: ~s idx: ~s", Args),
             compact(Idx, Mod, NewIdxState, [recompact]);
         _ ->
-            ?LOG_INFO("Compaction finished for db: ~s idx: ~s", Args),
+            couch_log:info("Compaction finished for db: ~s idx: ~s", Args),
             ok
     end.

http://git-wip-us.apache.org/repos/asf/couchdb-couch-index/blob/7acb7d37/src/couch_index_updater.erl
----------------------------------------------------------------------
diff --git a/src/couch_index_updater.erl b/src/couch_index_updater.erl
index ab68dc5..ad48f40 100644
--- a/src/couch_index_updater.erl
+++ b/src/couch_index_updater.erl
@@ -67,12 +67,12 @@ handle_call({update, _IdxState}, _From, #st{pid=Pid}=State) when is_pid(Pid)
->
     {reply, ok, State};
 handle_call({update, IdxState}, _From, #st{idx=Idx, mod=Mod}=State) ->
     Args = [Mod:get(db_name, IdxState), Mod:get(idx_name, IdxState)],
-    ?LOG_INFO("Starting index update for db: ~s idx: ~s", Args),
+    couch_log:info("Starting index update for db: ~s idx: ~s", Args),
     Pid = spawn_link(?MODULE, update, [Idx, Mod, IdxState]),
     {reply, ok, State#st{pid=Pid}};
 handle_call({restart, IdxState}, _From, #st{idx=Idx, mod=Mod}=State) ->
     Args = [Mod:get(db_name, IdxState), Mod:get(idx_name, IdxState)],
-    ?LOG_INFO("Restarting index update for db: ~s idx: ~s", Args),
+    couch_log:info("Restarting index update for db: ~s idx: ~s", Args),
     case is_pid(State#st.pid) of
         true -> couch_util:shutdown_sync(State#st.pid);
         _ -> ok
@@ -92,7 +92,7 @@ handle_cast(_Mesg, State) ->
 handle_info({'EXIT', _, {updated, Pid, IdxState}}, #st{pid=Pid}=State) ->
     Mod = State#st.mod,
     Args = [Mod:get(db_name, IdxState), Mod:get(idx_name, IdxState)],
-    ?LOG_INFO("Index update finished for db: ~s idx: ~s", Args),
+    couch_log:info("Index update finished for db: ~s idx: ~s", Args),
     ok = gen_server:cast(State#st.idx, {updated, IdxState}),
     {noreply, State#st{pid=undefined}};
 handle_info({'EXIT', _, {reset, Pid}}, #st{idx=Idx, pid=Pid}=State) ->


Mime
View raw message