You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by kx...@apache.org on 2014/09/24 22:39:08 UTC

couch-mrview commit: updated refs/heads/master to 899a2d5

Repository: couchdb-couch-mrview
Updated Branches:
  refs/heads/master a3191964e -> 899a2d551


Use couch_log instead of ?LOG_*


Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/commit/899a2d55
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/tree/899a2d55
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/diff/899a2d55

Branch: refs/heads/master
Commit: 899a2d551ae6db3cb7e3b30c930c3ba013448547
Parents: a319196
Author: Alexander Shorin <kx...@apache.org>
Authored: Wed Sep 24 19:13:41 2014 +0400
Committer: Alexander Shorin <kx...@apache.org>
Committed: Thu Sep 25 00:38:55 2014 +0400

----------------------------------------------------------------------
 src/couch_mrview_cleanup.erl   | 2 +-
 src/couch_mrview_compactor.erl | 3 ++-
 src/couch_mrview_index.erl     | 4 ++--
 src/couch_mrview_util.erl      | 9 +++++----
 4 files changed, 10 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/blob/899a2d55/src/couch_mrview_cleanup.erl
----------------------------------------------------------------------
diff --git a/src/couch_mrview_cleanup.erl b/src/couch_mrview_cleanup.erl
index d6b69b4..46c81b2 100644
--- a/src/couch_mrview_cleanup.erl
+++ b/src/couch_mrview_cleanup.erl
@@ -40,7 +40,7 @@ run(Db) ->
     ToDelete = DiskFiles -- SigFiles,
 
     lists:foreach(fun(FN) ->
-        ?LOG_DEBUG("Deleting stale view file: ~s", [FN]),
+        couch_log:debug("Deleting stale view file: ~s", [FN]),
         couch_file:delete(RootDir, FN, false)
     end, ToDelete),
 

http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/blob/899a2d55/src/couch_mrview_compactor.erl
----------------------------------------------------------------------
diff --git a/src/couch_mrview_compactor.erl b/src/couch_mrview_compactor.erl
index cd1321c..8b1c8f7 100644
--- a/src/couch_mrview_compactor.erl
+++ b/src/couch_mrview_compactor.erl
@@ -82,7 +82,8 @@ compact(State) ->
         #acc{btree = Bt, kvs = Kvs, kvs_size = KvsSize} = Acc,
         NewKvs = case Kvs of
             [{DocId, OldViewIdKeys} | Rest] ->
-                ?LOG_ERROR("Dupes of ~s in ~s ~s", [DocId, DbName, IdxName]),
+                couch_log:error("Dupes of ~s in ~s ~s",
+                                [DocId, DbName, IdxName]),
                 [{DocId, ViewIdKeys ++ OldViewIdKeys} | Rest];
             _ ->
                 [KV | Kvs]

http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/blob/899a2d55/src/couch_mrview_index.erl
----------------------------------------------------------------------
diff --git a/src/couch_mrview_index.erl b/src/couch_mrview_index.erl
index a269a8d..2d6ccae 100644
--- a/src/couch_mrview_index.erl
+++ b/src/couch_mrview_index.erl
@@ -120,8 +120,8 @@ open(Db, State) ->
                     {ok, NewSt#mrst{fd_monitor=erlang:monitor(process, Fd)}}
             end;
         {error, Reason} = Error ->
-            ?LOG_ERROR("Failed to open view file '~s': ~s",
-                       [IndexFName, file:format_error(Reason)]),
+            couch_log:error("Failed to open view file '~s': ~s",
+                            [IndexFName, file:format_error(Reason)]),
             Error
     end.
 

http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/blob/899a2d55/src/couch_mrview_util.erl
----------------------------------------------------------------------
diff --git a/src/couch_mrview_util.erl b/src/couch_mrview_util.erl
index 8f1a2d1..7fc60f8 100644
--- a/src/couch_mrview_util.erl
+++ b/src/couch_mrview_util.erl
@@ -87,7 +87,8 @@ ddoc_to_mrst(DbName, #doc{id=Id, body={Fields}}) ->
                 DictBySrcAcc
         end;
         ({Name, Else}, DictBySrcAcc) ->
-            ?LOG_ERROR("design_doc_to_view_group ~s views ~p", [Name, Else]),
+            couch_log:error("design_doc_to_view_group ~s views ~p",
+                            [Name, Else]),
             DictBySrcAcc
     end,
     {RawViews} = couch_util:get_value(<<"views">>, Fields, {[]}),
@@ -768,11 +769,11 @@ update_index_file(State) ->
         % If the target exists, e.g. the next request will find the
         % new file and we are good. We might need to catch this
         % further up to avoid a full server crash.
-        ?LOG_INFO("Attempting to update legacy view index file.", []),
+        couch_log:info("Attempting to update legacy view index file.", []),
         NewIndexFile = index_file(DbName, State#mrst.sig),
         ok = filelib:ensure_dir(NewIndexFile),
         ok = file:rename(IndexFile, NewIndexFile),
-        ?LOG_INFO("Successfully updated legacy view index file.", []),
+        couch_log:info("Successfully updated legacy view index file.", []),
         Sig;
     _ ->
         % Ignore missing index file
@@ -811,7 +812,7 @@ extract_view_reduce({red, {N, _Lang, #mrview{reduce_funs=Reds}}, _Ref}) ->
 get_view_keys({Props}) ->
     case couch_util:get_value(<<"keys">>, Props) of
         undefined ->
-            ?LOG_DEBUG("POST with no keys member.", []),
+            couch_log:debug("POST with no keys member.", []),
             undefined;
         Keys when is_list(Keys) ->
             Keys;