mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-26 16:26:24 +01:00
Add warning message and report handlers to ejabberd_logger_h.erl.
This commit is contained in:
parent
0c2677bc50
commit
19826858a4
@ -151,6 +151,19 @@ write_event(Fd, {Time, {info_msg, _GL, {Pid, Format, Args}}}) ->
|
|||||||
F = add_node("ERROR: ~p - ~p~n", Pid),
|
F = add_node("ERROR: ~p - ~p~n", Pid),
|
||||||
file:write(Fd, io_lib:format(T ++ F, [Format,Args]))
|
file:write(Fd, io_lib:format(T ++ F, [Format,Args]))
|
||||||
end;
|
end;
|
||||||
|
write_event(Fd, {Time, {warning_report, _GL, {Pid, std_warning, Rep}}}) ->
|
||||||
|
T = write_time(Time, "WARNING REPORT"),
|
||||||
|
S = format_report(Rep),
|
||||||
|
file:write(Fd, io_lib:format(T ++ S ++ add_node("", Pid), []));
|
||||||
|
write_event(Fd, {Time, {warning_msg, _GL, {Pid, Format, Args}}}) ->
|
||||||
|
T = write_time(Time, "WARNING REPORT"),
|
||||||
|
case catch io_lib:format(add_node(Format,Pid), Args) of
|
||||||
|
S when is_list(S) ->
|
||||||
|
file:write(Fd, io_lib:format(T ++ S, []));
|
||||||
|
_ ->
|
||||||
|
F = add_node("ERROR: ~p - ~p~n", Pid),
|
||||||
|
file:write(Fd, io:format(T ++ F, [Format,Args]))
|
||||||
|
end;
|
||||||
write_event(_, _) ->
|
write_event(_, _) ->
|
||||||
ok.
|
ok.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user