参考:https://blog.51cto.com/wsl919/874919
每次tsung启动在相应时间戳文件夹下,产生三种log文件
- match.log:可以用于记录服务器的response(这个暂时还没有仔细查看代码)
- tsung.log:用于记录压测过程中的statics数据
- tsung_controller@XXX.log:用于记录程序启动运行中产生的程序运行提示log
tsung运行过程中的日志分为8个等级
%% Debug messages can be completely disabled if DEBUG is not defined
-ifdef(DEBUG).
-define(TRACE, [{debug, [trace]}]).
-define(DebugF(Msg, Args),
ts_utils:debug(?MODULE, Msg, Args, ?DEB)).
-define(Debug(Msg),
ts_utils:debug(?MODULE, Msg, ?DEB)).
-else.
-define(TRACE, []).
-define(DebugF(Msg, Args), ok).
-define(Debug(Msg), ok).
-endif.
-define(EMERG, 0). % The system is unusable.
-define(ALERT, 1). % Action should be taken immediately to address the problem.
-define(CRIT, 2). % A critical condition has occurred.
-define(ERR, 3). % An error has occurred.
-define(WARN, 4). % A significant event that may require attention has occurred.
-define(NOTICE, 5).% An event that does not affect system operation has occurred.
-define(INFO, 6). % An normal operation has occurred.
-define(DEB, 7). % Debugging info
对于0-6等级,我们可以直接设置。
对于7等级也就是debug模式,代码中我们也可以看到因为宏的原因(这里类似C的预编译用法),我们必须在编译时指定make debug。
【popexizhi: make debug&& make install 后确实post的发送json 就有log了】
没有评论:
发表评论