You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by rn...@apache.org on 2014/02/12 23:55:15 UTC
mem3 commit: updated refs/heads/1843-feature-bigcouch to d42720a
Updated Branches:
refs/heads/1843-feature-bigcouch ce981e970 -> d42720ac7
Switch to couch_log
Project: http://git-wip-us.apache.org/repos/asf/couchdb-mem3/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-mem3/commit/d42720ac
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-mem3/tree/d42720ac
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-mem3/diff/d42720ac
Branch: refs/heads/1843-feature-bigcouch
Commit: d42720ac72c764851f5e1dd3761396a11cb246ef
Parents: ce981e9
Author: Robert Newson <ro...@cloudant.com>
Authored: Wed Feb 12 20:11:56 2014 +0000
Committer: Robert Newson <ro...@cloudant.com>
Committed: Wed Feb 12 22:55:02 2014 +0000
----------------------------------------------------------------------
src/mem3.app.src | 2 +-
src/mem3_nodes.erl | 2 +-
src/mem3_shards.erl | 6 +++---
src/mem3_sync.erl | 8 ++++----
src/mem3_sync_security.erl | 10 +++++-----
src/mem3_util.erl | 2 +-
6 files changed, 15 insertions(+), 15 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb-mem3/blob/d42720ac/src/mem3.app.src
----------------------------------------------------------------------
diff --git a/src/mem3.app.src b/src/mem3.app.src
index 616e4bd..ee8ba56 100644
--- a/src/mem3.app.src
+++ b/src/mem3.app.src
@@ -45,6 +45,6 @@
mochiweb,
couch,
rexi,
- twig
+ couch_log
]}
]}.
http://git-wip-us.apache.org/repos/asf/couchdb-mem3/blob/d42720ac/src/mem3_nodes.erl
----------------------------------------------------------------------
diff --git a/src/mem3_nodes.erl b/src/mem3_nodes.erl
index 782a8b5..f3e17b4 100644
--- a/src/mem3_nodes.erl
+++ b/src/mem3_nodes.erl
@@ -69,7 +69,7 @@ handle_cast(_Msg, State) ->
{noreply, State}.
handle_info({'DOWN', _, _, Pid, Reason}, #state{changes_pid=Pid} = State) ->
- twig:log(notice, "~p changes listener died ~p", [?MODULE, Reason]),
+ couch_log:log(notice, "~p changes listener died ~p", [?MODULE, Reason]),
StartSeq = State#state.update_seq,
Seq = case Reason of {seq, EndSeq} -> EndSeq; _ -> StartSeq end,
erlang:send_after(5000, self(), start_listener),
http://git-wip-us.apache.org/repos/asf/couchdb-mem3/blob/d42720ac/src/mem3_shards.erl
----------------------------------------------------------------------
diff --git a/src/mem3_shards.erl b/src/mem3_shards.erl
index 9949869..18afb79 100644
--- a/src/mem3_shards.erl
+++ b/src/mem3_shards.erl
@@ -147,7 +147,7 @@ handle_info({'DOWN', _, _, Pid, Reason}, #st{changes_pid=Pid}=St) ->
shard_db_changed ->
{cache_clear(St), get_update_seq()};
_ ->
- twig:log(notice, "~p changes listener died ~p", [?MODULE, Reason]),
+ couch_log:log(notice, "~p changes listener died ~p", [?MODULE, Reason]),
{St, get_update_seq()}
end,
erlang:send_after(5000, self(), {start_listener, Seq}),
@@ -218,7 +218,7 @@ changes_callback({change, {Change}, _}, _) ->
false ->
case couch_util:get_value(doc, Change) of
{error, Reason} ->
- twig:log(error, "missing partition table for ~s: ~p",
+ couch_log:log(error, "missing partition table for ~s: ~p",
[DbName, Reason]);
{Doc} ->
Shards = mem3_util:build_shards(DbName, Doc),
@@ -268,7 +268,7 @@ create_if_missing(Name) ->
{ok, Db} ->
couch_db:close(Db);
Error ->
- twig:log(error, "~p tried to create ~s, got ~p",
+ couch_log:log(error, "~p tried to create ~s, got ~p",
[?MODULE, Name, Error])
end
end.
http://git-wip-us.apache.org/repos/asf/couchdb-mem3/blob/d42720ac/src/mem3_sync.erl
----------------------------------------------------------------------
diff --git a/src/mem3_sync.erl b/src/mem3_sync.erl
index e47f6fa..dcda1c2 100644
--- a/src/mem3_sync.erl
+++ b/src/mem3_sync.erl
@@ -134,7 +134,7 @@ handle_info({'EXIT', Active, {{not_found, no_db_file}, _Stack}}, State) ->
handle_info({'EXIT', Active, Reason}, State) ->
NewState = case lists:keyfind(Active, #job.pid, State#state.active) of
#job{name=OldDbName, node=OldNode} = Job ->
- twig:log(warn, "~s ~s ~s ~w", [?MODULE, OldDbName, OldNode, Reason]),
+ couch_log:log(warn, "~s ~s ~s ~w", [?MODULE, OldDbName, OldNode, Reason]),
case Reason of {pending_changes, Count} ->
maybe_resubmit(State, Job#job{pid = nil, count = Count});
_ ->
@@ -150,7 +150,7 @@ handle_info({'EXIT', Active, Reason}, State) ->
handle_replication_exit(NewState, Active);
handle_info(Msg, State) ->
- twig:log(notice, "unexpected msg at replication manager ~p", [Msg]),
+ couch_log:log(notice, "unexpected msg at replication manager ~p", [Msg]),
{noreply, State}.
terminate(_Reason, State) ->
@@ -221,7 +221,7 @@ add_to_queue(State, #job{name=DbName, node=Node, pid=From} = Job) ->
if From =/= nil -> gen_server:reply(From, ok); true -> ok end,
State;
false ->
- twig:log(debug, "adding ~s -> ~p to mem3_sync queue", [DbName, Node]),
+ couch_log:log(debug, "adding ~s -> ~p to mem3_sync queue", [DbName, Node]),
State#state{
dict = dict:store({DbName,Node}, ok, D),
waiting = in(Job, WQ)
@@ -339,6 +339,6 @@ maybe_redirect(Node) ->
undefined ->
Node;
Redirect ->
- twig:log(debug, "Redirecting push from ~p to ~p", [Node, Redirect]),
+ couch_log:log(debug, "Redirecting push from ~p to ~p", [Node, Redirect]),
list_to_existing_atom(Redirect)
end.
http://git-wip-us.apache.org/repos/asf/couchdb-mem3/blob/d42720ac/src/mem3_sync_security.erl
----------------------------------------------------------------------
diff --git a/src/mem3_sync_security.erl b/src/mem3_sync_security.erl
index da112aa..b981768 100644
--- a/src/mem3_sync_security.erl
+++ b/src/mem3_sync_security.erl
@@ -37,7 +37,7 @@ maybe_sync_int(#shard{name=Name}=Src, Dst) ->
end;
Else ->
Args = [DbName, Else],
- twig:log(err, "Error checking security objects for ~s :: ~p", Args)
+ couch_log:log(err, "Error checking security objects for ~s :: ~p", Args)
end.
go() ->
@@ -55,18 +55,18 @@ handle_db(DbName) ->
ok ->
ok;
{fixable, SecObj} ->
- twig:log(info, "Sync security object for ~p: ~p", [DbName, SecObj]),
+ couch_log:log(info, "Sync security object for ~p: ~p", [DbName, SecObj]),
case fabric:set_security(DbName, SecObj) of
ok -> ok;
Error ->
- twig:log(err, "Error setting security object in ~p: ~p",
+ couch_log:log(err, "Error setting security object in ~p: ~p",
[DbName, Error])
end;
broken ->
- twig:log(err, "Bad security object in ~p: ~p", [DbName, SecObjs])
+ couch_log:log(err, "Bad security object in ~p: ~p", [DbName, SecObjs])
end;
Error ->
- twig:log(err, "Error getting security objects for ~p: ~p", [
+ couch_log:log(err, "Error getting security objects for ~p: ~p", [
DbName, Error])
end.
http://git-wip-us.apache.org/repos/asf/couchdb-mem3/blob/d42720ac/src/mem3_util.erl
----------------------------------------------------------------------
diff --git a/src/mem3_util.erl b/src/mem3_util.erl
index 4460df6..8ed1d73 100644
--- a/src/mem3_util.erl
+++ b/src/mem3_util.erl
@@ -155,7 +155,7 @@ n_val(undefined, NodeCount) ->
n_val(N, NodeCount) when is_list(N) ->
n_val(list_to_integer(N), NodeCount);
n_val(N, NodeCount) when is_integer(NodeCount), N > NodeCount ->
- twig:log(error, "Request to create N=~p DB but only ~p node(s)", [N, NodeCount]),
+ couch_log:log(error, "Request to create N=~p DB but only ~p node(s)", [N, NodeCount]),
NodeCount;
n_val(N, _) when N < 1 ->
1;