mirror of
https://github.com/valitydev/riak_test.git
synced 2024-11-06 08:35:22 +00:00
moved infrastucture lager messages to info level
This commit is contained in:
parent
b2044245ac
commit
4a20d06daa
@ -107,4 +107,4 @@ io_requests(_, Result) ->
|
||||
|
||||
%% If we get multiple lines, we'll split them up for lager to maximize the prettiness.
|
||||
log_chars(Chars) ->
|
||||
[lager:debug("~s", [Line]) || Line <- string:tokens(lists:flatten(Chars), "\n")].
|
||||
[lager:info("~s", [Line]) || Line <- string:tokens(lists:flatten(Chars), "\n")].
|
12
src/rt.erl
12
src/rt.erl
@ -338,7 +338,7 @@ slow_upgrade(Node, NewVersion, Nodes) ->
|
||||
%% @doc Have `Node' send a join request to `PNode'
|
||||
join(Node, PNode) ->
|
||||
R = try_join(Node, PNode),
|
||||
lager:debug("[join] ~p to (~p): ~p", [Node, PNode, R]),
|
||||
lager:info("[join] ~p to (~p): ~p", [Node, PNode, R]),
|
||||
?assertEqual(ok, R),
|
||||
ok.
|
||||
|
||||
@ -355,7 +355,7 @@ try_join(Node, PNode) ->
|
||||
%% @doc Have the `Node' leave the cluster
|
||||
leave(Node) ->
|
||||
R = try_leave(Node),
|
||||
lager:debug("[leave] ~p: ~p", [Node, R]),
|
||||
lager:info("[leave] ~p: ~p", [Node, R]),
|
||||
?assertEqual(ok, R),
|
||||
ok.
|
||||
|
||||
@ -1173,10 +1173,10 @@ config_or_os_env(Config) ->
|
||||
MSG = io_lib:format("Neither riak_test.~p nor ENV['~p'] are defined", [Config, OSEnvVar]),
|
||||
erlang:error(binary_to_list(iolist_to_binary(MSG)));
|
||||
{undefined, V} ->
|
||||
lager:debug("Found riak_test.~s: ~s", [Config, V]),
|
||||
lager:info("Found riak_test.~s: ~s", [Config, V]),
|
||||
V;
|
||||
{V, _} ->
|
||||
lager:debug("Found ENV[~s]: ~s", [OSEnvVar, V]),
|
||||
lager:info("Found ENV[~s]: ~s", [OSEnvVar, V]),
|
||||
rt:set_config(Config, V),
|
||||
V
|
||||
end.
|
||||
@ -1187,10 +1187,10 @@ config_or_os_env(Config, Default) ->
|
||||
case {get_os_env(OSEnvVar, undefined), config(Config, undefined)} of
|
||||
{undefined, undefined} -> Default;
|
||||
{undefined, V} ->
|
||||
lager:debug("Found riak_test.~s: ~s", [Config, V]),
|
||||
lager:info("Found riak_test.~s: ~s", [Config, V]),
|
||||
V;
|
||||
{V, _} ->
|
||||
lager:debug("Found ENV[~s]: ~s", [OSEnvVar, V]),
|
||||
lager:info("Found ENV[~s]: ~s", [OSEnvVar, V]),
|
||||
rt:set_config(Config, V),
|
||||
V
|
||||
end.
|
||||
|
@ -46,6 +46,6 @@ init(Props) ->
|
||||
?CHILD(Num, loaded_upgrade_worker_sup, Node, Backend, Vsn)
|
||||
|| Num <- lists:seq(1, WorkersPerNode)],
|
||||
|
||||
lager:debug("Starting ~p workers to ~p", [WorkersPerNode, Node]),
|
||||
lager:info("Starting ~p workers to ~p", [WorkersPerNode, Node]),
|
||||
|
||||
{ok, {{one_for_one, 1000, 60}, ChildSpecs}}.
|
||||
|
@ -48,7 +48,7 @@ riak_admin_cmd(Path, N, Args) ->
|
||||
io_lib:format("~s/dev/dev~b/bin/riak-admin ~s", [Path, N, ArgStr]).
|
||||
|
||||
run_git(Path, Cmd) ->
|
||||
lager:debug("Running: ~s", [gitcmd(Path, Cmd)]),
|
||||
lager:info("Running: ~s", [gitcmd(Path, Cmd)]),
|
||||
os:cmd(gitcmd(Path, Cmd)).
|
||||
|
||||
run_riak(N, Path, Cmd) ->
|
||||
@ -278,10 +278,10 @@ stop_all(DevPath) ->
|
||||
"ok" -> "ok";
|
||||
_ -> "wasn't running"
|
||||
end,
|
||||
lager:debug("Stopping Node... ~s ~~ ~s.", [Cmd, Status])
|
||||
lager:info("Stopping Node... ~s ~~ ~s.", [Cmd, Status])
|
||||
end,
|
||||
[Stop(D) || D <- Devs];
|
||||
_ -> lager:debug("~s is not a directory.", [DevPath])
|
||||
_ -> lager:info("~s is not a directory.", [DevPath])
|
||||
end,
|
||||
ok.
|
||||
|
||||
@ -310,7 +310,7 @@ interactive(Node, Command, Exp) ->
|
||||
N = node_id(Node),
|
||||
Path = relpath(node_version(N)),
|
||||
Cmd = riakcmd(Path, N, Command),
|
||||
lager:debug("Opening a port for riak ~s.", [Command]),
|
||||
lager:info("Opening a port for riak ~s.", [Command]),
|
||||
P = open_port({spawn, binary_to_list(iolist_to_binary(Cmd))},
|
||||
[stream, use_stdio, exit_status, binary, stderr_to_stdout]),
|
||||
interactive_loop(P, Exp).
|
||||
@ -384,16 +384,16 @@ admin(Node, Args) ->
|
||||
N = node_id(Node),
|
||||
Path = relpath(node_version(N)),
|
||||
Cmd = riak_admin_cmd(Path, N, Args),
|
||||
lager:debug("Running: ~s", [Cmd]),
|
||||
lager:info("Running: ~s", [Cmd]),
|
||||
Result = os:cmd(Cmd),
|
||||
lager:debug("~s", [Result]),
|
||||
lager:info("~s", [Result]),
|
||||
{ok, Result}.
|
||||
|
||||
riak(Node, Args) ->
|
||||
N = node_id(Node),
|
||||
Path = relpath(node_version(N)),
|
||||
Result = run_riak(N, Path, Args),
|
||||
lager:debug("~s", [Result]),
|
||||
lager:info("~s", [Result]),
|
||||
{ok, Result}.
|
||||
|
||||
node_id(Node) ->
|
||||
|
Loading…
Reference in New Issue
Block a user