Return-Path: X-Original-To: apmail-couchdb-commits-archive@www.apache.org Delivered-To: apmail-couchdb-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 474851093C for ; Wed, 12 Feb 2014 22:56:15 +0000 (UTC) Received: (qmail 52064 invoked by uid 500); 12 Feb 2014 22:56:14 -0000 Delivered-To: apmail-couchdb-commits-archive@couchdb.apache.org Received: (qmail 51986 invoked by uid 500); 12 Feb 2014 22:56:14 -0000 Mailing-List: contact commits-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list commits@couchdb.apache.org Received: (qmail 51979 invoked by uid 99); 12 Feb 2014 22:56:14 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Feb 2014 22:56:14 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id D42DA89D18D; Wed, 12 Feb 2014 22:56:13 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: rnewson@apache.org To: commits@couchdb.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: fabric commit: updated refs/heads/1843-feature-bigcouch to d821fda Date: Wed, 12 Feb 2014 22:56:13 +0000 (UTC) Updated Branches: refs/heads/1843-feature-bigcouch 5518feafa -> d821fda62 Switch to couch_log Project: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/commit/d821fda6 Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/tree/d821fda6 Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fabric/diff/d821fda6 Branch: refs/heads/1843-feature-bigcouch Commit: d821fda625bc8996bc94e125c9ad47eac3af37b8 Parents: 5518fea Author: Robert Newson Authored: Wed Feb 12 20:12:38 2014 +0000 Committer: Robert Newson Committed: Wed Feb 12 20:12:38 2014 +0000 ---------------------------------------------------------------------- include/couch_db_tmp.hrl | 6 +++--- src/fabric.app.src | 2 +- src/fabric_db_delete.erl | 2 +- src/fabric_db_meta.erl | 4 ++-- src/fabric_db_update_listener.erl | 2 +- src/fabric_doc_open.erl | 2 +- src/fabric_doc_open_revs.erl | 2 +- src/fabric_doc_update.erl | 2 +- src/fabric_rpc.erl | 4 ++-- src/fabric_view.erl | 2 +- 10 files changed, 14 insertions(+), 14 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb-fabric/blob/d821fda6/include/couch_db_tmp.hrl ---------------------------------------------------------------------- diff --git a/include/couch_db_tmp.hrl b/include/couch_db_tmp.hrl index 96f3a2f..3a8e9d7 100644 --- a/include/couch_db_tmp.hrl +++ b/include/couch_db_tmp.hrl @@ -25,9 +25,9 @@ -define(DEFAULT_ATTACHMENT_CONTENT_TYPE, <<"application/octet-stream">>). --define(LOG_DEBUG(Format, Args), twig:log(debug, Format, Args)). --define(LOG_INFO(Format, Args), twig:log(notice, Format, Args)). --define(LOG_ERROR(Format, Args), twig:log(error, Format, Args)). +-define(LOG_DEBUG(Format, Args), couch_log:log(debug, Format, Args)). +-define(LOG_INFO(Format, Args), couch_log:log(notice, Format, Args)). +-define(LOG_ERROR(Format, Args), couch_log:log(error, Format, Args)). -record(rev_info, { http://git-wip-us.apache.org/repos/asf/couchdb-fabric/blob/d821fda6/src/fabric.app.src ---------------------------------------------------------------------- diff --git a/src/fabric.app.src b/src/fabric.app.src index 5ac86ef..f18fcc3 100644 --- a/src/fabric.app.src +++ b/src/fabric.app.src @@ -44,6 +44,6 @@ couch, rexi, mem3, - twig + couch_log ]} ]}. http://git-wip-us.apache.org/repos/asf/couchdb-fabric/blob/d821fda6/src/fabric_db_delete.erl ---------------------------------------------------------------------- diff --git a/src/fabric_db_delete.erl b/src/fabric_db_delete.erl index 934f95b..ff81d19 100644 --- a/src/fabric_db_delete.erl +++ b/src/fabric_db_delete.erl @@ -74,7 +74,7 @@ maybe_stop(W, Counters) -> case {Ok + NotFound, Ok, NotFound} of {W, 0, W} -> {#shard{dbname=Name}, _} = hd(Counters), - twig:log(warn, "~p not_found ~s", [?MODULE, Name]), + couch_log:log(warn, "~p not_found ~s", [?MODULE, Name]), {stop, not_found}; {W, _, _} -> {stop, ok}; http://git-wip-us.apache.org/repos/asf/couchdb-fabric/blob/d821fda6/src/fabric_db_meta.erl ---------------------------------------------------------------------- diff --git a/src/fabric_db_meta.erl b/src/fabric_db_meta.erl index 78a3952..662e2d3 100644 --- a/src/fabric_db_meta.erl +++ b/src/fabric_db_meta.erl @@ -78,7 +78,7 @@ handle_set_message(ok, W, Acc) -> maybe_finish_set(NewAcc); handle_set_message(Error, W, Acc) -> Dst = {W#shard.node, W#shard.name}, - twig:log(err, "Failed to set security object on ~p :: ~p", [Dst, Error]), + couch_log:log(err, "Failed to set security object on ~p :: ~p", [Dst, Error]), NewAcc = Acc#acc{workers = (Acc#acc.workers -- [W])}, maybe_finish_set(NewAcc). @@ -147,7 +147,7 @@ handle_get_message({Props}=SecObj, W, Acc) when is_list(Props) -> maybe_finish_get(NewAcc); handle_get_message(Error, W, Acc) -> Dst = {W#shard.node, W#shard.name}, - twig:log(err, "Failed to get security object on ~p :: ~p", [Dst, Error]), + couch_log:log(err, "Failed to get security object on ~p :: ~p", [Dst, Error]), NewAcc = Acc#acc{workers = (Acc#acc.workers -- [W])}, maybe_finish_set(NewAcc). http://git-wip-us.apache.org/repos/asf/couchdb-fabric/blob/d821fda6/src/fabric_db_update_listener.erl ---------------------------------------------------------------------- diff --git a/src/fabric_db_update_listener.erl b/src/fabric_db_update_listener.erl index 28e5972..190c582 100644 --- a/src/fabric_db_update_listener.erl +++ b/src/fabric_db_update_listener.erl @@ -89,7 +89,7 @@ cleanup_monitor(Parent, Ref, Notifiers) -> {Parent, stop} -> stop_update_notifiers(Notifiers); Else -> - twig:log(error, "Unkown message in ~w :: ~w", [?MODULE, Else]), + couch_log:log(error, "Unkown message in ~w :: ~w", [?MODULE, Else]), stop_update_notifiers(Notifiers), exit(Parent, {unknown_message, Else}) end. http://git-wip-us.apache.org/repos/asf/couchdb-fabric/blob/d821fda6/src/fabric_doc_open.erl ---------------------------------------------------------------------- diff --git a/src/fabric_doc_open.erl b/src/fabric_doc_open.erl index caa389e..76bdefd 100644 --- a/src/fabric_doc_open.erl +++ b/src/fabric_doc_open.erl @@ -120,7 +120,7 @@ read_repair(#acc{dbname=DbName, replies=Replies}) -> Ctx = #user_ctx{roles=[<<"_admin">>]}, Opts = [replicated_changes, {user_ctx, Ctx}], Res = fabric:update_docs(DbName, Docs, Opts), - twig:log(notice, "read_repair ~s ~s ~p", [DbName, Id, Res]), + couch_log:log(notice, "read_repair ~s ~s ~p", [DbName, Id, Res]), choose_reply(Docs); [] -> % Try hard to return some sort of information http://git-wip-us.apache.org/repos/asf/couchdb-fabric/blob/d821fda6/src/fabric_doc_open_revs.erl ---------------------------------------------------------------------- diff --git a/src/fabric_doc_open_revs.erl b/src/fabric_doc_open_revs.erl index 398a675..0165d9c 100644 --- a/src/fabric_doc_open_revs.erl +++ b/src/fabric_doc_open_revs.erl @@ -167,7 +167,7 @@ maybe_execute_read_repair(Db, Docs) -> [#doc{id=Id} | _] = Docs, Ctx = #user_ctx{roles=[<<"_admin">>]}, Res = fabric:update_docs(Db, Docs, [replicated_changes, {user_ctx,Ctx}]), - twig:log(notice, "read_repair ~s ~s ~p", [Db, Id, Res]). + couch_log:log(notice, "read_repair ~s ~s ~p", [Db, Id, Res]). % hackery required so that not_found sorts first strip_not_found_missing([]) -> http://git-wip-us.apache.org/repos/asf/couchdb-fabric/blob/d821fda6/src/fabric_doc_update.erl ---------------------------------------------------------------------- diff --git a/src/fabric_doc_update.erl b/src/fabric_doc_update.erl index 50c244c..98982b7 100644 --- a/src/fabric_doc_update.erl +++ b/src/fabric_doc_update.erl @@ -96,7 +96,7 @@ force_reply(Doc, [FirstReply|_] = Replies, {Health, W, Acc}) -> {true, Reply} -> {Health, W, [{Doc,Reply} | Acc]}; false -> - twig:log(warn, "write quorum (~p) failed for ~s", [W, Doc#doc.id]), + couch_log:log(warn, "write quorum (~p) failed for ~s", [W, Doc#doc.id]), case [Reply || {ok, Reply} <- Replies] of [] -> % check if all errors are identical, if so inherit health http://git-wip-us.apache.org/repos/asf/couchdb-fabric/blob/d821fda6/src/fabric_rpc.erl ---------------------------------------------------------------------- diff --git a/src/fabric_rpc.erl b/src/fabric_rpc.erl index afcf0e5..d3ccdc5 100644 --- a/src/fabric_rpc.erl +++ b/src/fabric_rpc.erl @@ -289,7 +289,7 @@ with_db(DbName, Options, {M,F,A}) -> catch Exception -> Exception; error:Reason -> - twig:log(error, "rpc ~p:~p/~p ~p ~p", [M, F, length(A)+1, Reason, + couch_log:log(error, "rpc ~p:~p/~p ~p ~p", [M, F, length(A)+1, Reason, clean_stack()]), {error, Reason} end); @@ -300,7 +300,7 @@ with_db(DbName, Options, {M,F,A}) -> get_or_create_db(DbName, Options) -> case couch_db:open_int(DbName, Options) of {not_found, no_db_file} -> - twig:log(warn, "~p creating ~s", [?MODULE, DbName]), + couch_log:log(warn, "~p creating ~s", [?MODULE, DbName]), couch_server:create(DbName, Options); Else -> Else http://git-wip-us.apache.org/repos/asf/couchdb-fabric/blob/d821fda6/src/fabric_view.erl ---------------------------------------------------------------------- diff --git a/src/fabric_view.erl b/src/fabric_view.erl index 942231f..57d631e 100644 --- a/src/fabric_view.erl +++ b/src/fabric_view.erl @@ -254,7 +254,7 @@ sort_fun(rev) -> fun(A,A) -> true; (A,B) -> couch_view:less_json(B,A) end. extract_view(Pid, ViewName, [], _ViewType) -> - twig:log(error, "missing_named_view ~p", [ViewName]), + couch_log:log(error, "missing_named_view ~p", [ViewName]), exit(Pid, kill), exit(missing_named_view); extract_view(Pid, ViewName, [View|Rest], ViewType) ->