Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

change log level of controller msgs

  • Loading branch information...
commit 590533a90b8fe36a9b7678982dfbba7323f07db5 1 parent a00a71d
@nniclausse nniclausse authored
View
2  src/tsung_controller/ts_config.erl
@@ -357,7 +357,7 @@ parse(Element = #xmlElement{name=session, attributes=Attrs},
Bidi = getAttr(atom,Attrs, bidi, Bidi_def),
Name = getAttr(Attrs, name),
?LOGF("Session name for id ~p is ~p~n",[Id+1, Name],?NOTICE),
- ?LOGF("Session type: persistent=~p, bidi=~p~n",[Persistent,Bidi],?NOTICE),
+ ?LOGF("Session type: persistent=~p, bidi=~p~n",[Persistent,Bidi],?INFO),
Probability = getAttr(float_or_integer, Attrs, probability, 0),
Weight = getAttr(float_or_integer, Attrs, weight, 0),
{Popularity, NewUseWeights, NewTotal} = get_popularity(Probability, Weight, Conf#config.use_weights,Conf#config.total_popularity),
View
2  src/tsung_controller/ts_config_http.erl
@@ -219,7 +219,7 @@ set_msg(HTTP=#http_request{url="%%" ++ _TailURL}, {true, MatchRegExp, _Proxy, _
#ts_request{ack = parse, subst = true, match = MatchRegExp });
%% relative URL, no proxy, a single server => we can preset host header at configuration time
set_msg(HTTPRequest, Args={_SubstFlag, _MatchRegExp, false, [Server], [],_Tab,_Id}) ->
- ?LOG("Relative URL, single server ",?NOTICE),
+ ?LOG("Relative URL, single server ",?INFO),
URL = server_to_url(Server) ++ HTTPRequest#http_request.url,
set_msg(HTTPRequest#http_request{url=URL}, Args);
%% relative URL, no proxy, several servers: don't set host header
View
14 src/tsung_controller/ts_config_server.erl
@@ -365,7 +365,7 @@ handle_cast({newbeams, HostList}, State=#state{logdir = LogDir,
{BeamsIds, LastId} = lists:mapfoldl(fun(A,Acc) -> {{A, Acc}, Acc+1} end, Id0, RemoteBeams),
Fun = fun({Host,Id}) -> remote_launcher(Host, Id, Args) end,
RemoteNodes = ts_utils:pmap(Fun, BeamsIds),
- ?LOG("All remote beams started, sync ~n",?NOTICE),
+ ?LOG("All remote beams started, syncing ~n",?NOTICE),
global:sync(),
StartLaunchers = fun(Node) ->
ts_launcher_static:launch({Node,[]}),
@@ -591,10 +591,10 @@ print_info() ->
{value, {_,_ ,V}} -> V;
_ -> "unknown"
end,
- ?LOGF("SYSINFO:Tsung version: ~s~n",[VSN],?NOTICE),
- ?LOGF("SYSINFO:Erlang version: ~s~n",[erlang:system_info(system_version)],?NOTICE),
- ?LOGF("SYSINFO:System architecture ~s~n",[erlang:system_info(system_architecture)],?NOTICE),
- ?LOGF("SYSINFO:Current path: ~s~n",[code:which(tsung)],?NOTICE).
+ ?LOGF("SYSINFO:Tsung version: ~s~n",[VSN],?WARN),
+ ?LOGF("SYSINFO:Erlang version: ~s~n",[erlang:system_info(system_version)],?WARN),
+ ?LOGF("SYSINFO:System architecture ~s~n",[erlang:system_info(system_architecture)],?WARN),
+ ?LOGF("SYSINFO:Current path: ~s~n",[code:which(tsung)],?WARN).
%%----------------------------------------------------------------------
%% Func: start_file_server/1
@@ -695,9 +695,9 @@ sort_static(Config=#config{static_users=S})->
start_slave(Host, Name, Args) when is_atom(Host), is_atom(Name)->
case slave:start(Host, Name, Args) of
{ok, Node} ->
- ?LOGF("started newbeam on node ~p ~n", [Node], ?NOTICE),
+ ?LOGF("Remote beam started on node ~p ~n", [Node], ?NOTICE),
Res = net_adm:ping(Node),
- ?LOGF("ping ~p ~p~n", [Node,Res], ?NOTICE),
+ ?LOGF("ping ~p ~p~n", [Node,Res], ?INFO),
Node;
{error, Reason} ->
?LOGF("Can't start newbeam on host ~p (reason: ~p) ! Aborting!~n",[Host, Reason],?EMERG),
View
6 src/tsung_controller/ts_job_notify.erl
@@ -96,12 +96,12 @@ wait_jobs(Pid) ->
%% @end
%%--------------------------------------------------------------------
init([]) ->
- ?LOG("Starting~n",?DEB),
+ ?LOG("Starting~n",?INFO),
case global:whereis_name(ts_config_server) of
undefined ->
{ok, #state{jobs=ets:new(jobs,[{keypos, #job_session.jobid}])}};
_Pid ->
- ?LOG("Config server is alive !~n",?DEB),
+ ?LOG("Config server is alive !~n",?INFO),
case ts_config_server:get_jobs_state() of
{Jobs,Port} ->
?LOG("Got backup of node state~n",?DEB),
@@ -166,7 +166,7 @@ handle_cast({wait_jobs, Pid}, State=#state{jobs=Jobs}) ->
{noreply, State};
handle_cast({listen, undefined}, State) ->
- ?LOG("No listen port defined, can't open listening socket ~n",?NOTICE),
+ ?LOG("No listen port defined, can't open listening socket ~n",?INFO),
{noreply, State};
handle_cast({listen,Port}, State) ->
Opts = [{reuseaddr, true}, {active, once}],
View
8 src/tsung_controller/ts_match_logger.erl
@@ -64,7 +64,7 @@
%% @end
%%----------------------------------------------------------------------
start(LogDir) ->
- ?LOG("starting match logger, global ~n",?NOTICE),
+ ?LOG("starting match logger, global ~n",?INFO),
gen_server:start_link({global, ?MODULE}, ?MODULE, [LogDir], []).
stop() ->
@@ -91,12 +91,12 @@ add(Data) ->
%% {stop, Reason}
%%----------------------------------------------------------------------
init([LogDir]) ->
- ?LOG("starting match logger~n",?NOTICE),
+ ?LOG("starting match logger~n",?INFO),
Base = filename:basename(?config(match_log_file)),
Filename = filename:join(LogDir, Base),
case file:open(Filename,[write, {delayed_write, ?DELAYED_WRITE_SIZE, ?DELAYED_WRITE_DELAY}]) of
{ok, Fd} ->
- ?LOG("starting match logger~n",?NOTICE),
+ ?LOG("starting match logger~n",?INFO),
io:format(Fd,"# timestamp userid sessionid requestid event transaction~n",[]),
{ok, #state{ fd = Fd,
filename = Filename,
@@ -157,7 +157,7 @@ handle_info(_Info, State) ->
%% Returns: any (ignored by gen_server)
%%----------------------------------------------------------------------
terminate(Reason, State) ->
- ?LOGF("stoping match logger (~p)~n",[Reason],?NOTICE),
+ ?LOGF("stopping match logger (~p)~n",[Reason],?INFO),
file:close(State#state.fd),
ok.
View
10 src/tsung_controller/ts_mon.erl
@@ -159,7 +159,7 @@ launcher_is_alive() ->
%% {stop, Reason}
%%----------------------------------------------------------------------
init([LogDir]) ->
- ?LOGF("Init, log dir is ~p~n",[LogDir],?NOTICE),
+ ?LOGF("Init, log dir is ~p~n",[LogDir],?INFO),
Stats = #stats{os_mon = dict:new()},
State=#state{ dump_interval = ?config(dumpstats_interval),
log_dir = LogDir,
@@ -174,7 +174,7 @@ init([LogDir]) ->
Filename = filename:join(LogDir, Name),
case file:open(Filename,[write]) of
{ok, Stream} ->
- ?LOG("starting monitor~n",?NOTICE),
+ ?LOG("starting monitor~n",?INFO),
{ok, State#state{log=Stream}};
{error, Reason} ->
?LOGF("Can't open mon log file! ~p~n",[Reason], ?ERR),
@@ -332,7 +332,7 @@ handle_cast({stop}, State=#state{launchers=L}) -> % we should stop, wait until n
{noreply, State#state{stop = true, launchers=L-1}};
handle_cast({launcher_is_alive}, State=#state{launchers=L}) ->
- ?LOG("A launcher has started~n", ?NOTICE),
+ ?LOG("A launcher has started~n", ?INFO),
{noreply, State#state{launchers=L+1}};
@@ -485,10 +485,10 @@ export_stats_common(BackEnd, Stats,LastStats,Log)->
%% @doc start the launcher on clients nodes
%%----------------------------------------------------------------------
start_launchers(Machines) ->
- ?DebugF("Need to start tsung client on ~p~n",[Machines]),
+ ?LOGF("Tsung clients setup: ~p~n",[Machines],?DEB),
GetHost = fun(A) -> list_to_atom(A#client.host) end,
HostList = lists:map(GetHost, Machines),
- ?DebugF("Hostlist is ~p~n",[HostList]),
+ ?LOGF("Starting tsung clients on hosts: ~p~n",[HostList],?NOTICE),
%% starts beam on all client hosts
ts_config_server:newbeams(HostList).
View
7 src/tsung_controller/ts_os_mon_erlang.erl
@@ -50,7 +50,6 @@
}).
start(Args) ->
- ?LOGF("starting os_mon_erlang with args ~p",[Args],?NOTICE),
gen_server:start_link(?MODULE, Args, []).
%%--------------------------------------------------------------------
@@ -181,7 +180,7 @@ client_start() ->
%% Purpose: Load ts_os_mon code on all Erlang nodes
%%--------------------------------------------------------------------
load_code(Nodes) ->
- ?LOGF("loading tsung monitor on nodes ~p~n", [Nodes], ?NOTICE),
+ ?LOGF("Loading tsung monitor on nodes ~p~n", [Nodes], ?NOTICE),
LoadCode = fun(Mod)->
{_, Binary, _} = code:get_object_code(Mod),
rpc:multicall(Nodes, code, load_binary, [Mod, Mod, Binary], infinity)
@@ -257,6 +256,6 @@ get_os_data(packets, {unix, _}, Data) ->
%%--------------------------------------------------------------------
start_beam(Host) ->
Args = ts_utils:erl_system_args(),
- ?LOGF("starting os_mon beam (~p) on host ~p with Args ~p~n",
- [?NODE,Host, Args], ?INFO),
+ ?LOGF("Starting os_mon beam on host ~p ~n", [Host], ?NOTICE),
+ ?LOGF("~p Args: ~p~n", [Host, Args], ?DEB),
slave:start(list_to_atom(Host), ?NODE, Args).
View
10 src/tsung_controller/ts_stats_mon.erl
@@ -70,11 +70,11 @@
%% @doc Start the monitoring process
%%----------------------------------------------------------------------
start(Id) ->
- ?LOGF("starting ~p stats server, global ~n",[Id],?NOTICE),
+ ?LOGF("starting ~p stats server, global ~n",[Id],?INFO),
gen_server:start_link({global, Id}, ?MODULE, [Id], []).
start() ->
- ?LOG("starting stats server, global ~n",?NOTICE),
+ ?LOG("starting stats server, global ~n",?INFO),
gen_server:start_link({global, ?MODULE}, ?MODULE, [?MODULE], []).
stop(Id) ->
@@ -120,7 +120,7 @@ set_output(BackEnd,Stream,Id) ->
%%----------------------------------------------------------------------
%% single type of data: don't need a dict, a simple list can store the data
init([Type]) when Type == 'connect'; Type == 'page'; Type == 'request' ->
- ?LOGF("starting dedicated stats server for ~p ~n",[Type],?NOTICE),
+ ?LOGF("starting dedicated stats server for ~p ~n",[Type],?INFO),
Stats = [0,0,0,0,0,0,0,0],
{ok, #state{ dump_interval = ?config(dumpstats_interval),
stats = Stats,
@@ -129,7 +129,7 @@ init([Type]) when Type == 'connect'; Type == 'page'; Type == 'request' ->
}};
%% id = transaction or ?MODULE: it can handle several types of stats, must use a dict.
init([Id]) ->
- ?LOGF("starting ~p stats server~n",[Id],?NOTICE),
+ ?LOGF("starting ~p stats server~n",[Id],?INFO),
Tab = dict:new(),
{ok, #state{ dump_interval = ?config(dumpstats_interval),
stats = Tab,
@@ -223,7 +223,7 @@ handle_info(_Info, State) ->
%% Returns: any (ignored by gen_server)
%%----------------------------------------------------------------------
terminate(Reason, State) ->
- ?LOGF("stoping stats monitor (~p)~n",[Reason],?NOTICE),
+ ?LOGF("stopping stats monitor (~p)~n",[Reason],?INFO),
export_stats(State),
ok.
Please sign in to comment.
Something went wrong with that request. Please try again.