diff --git a/src/ejabberd_logger_h.erl b/src/ejabberd_logger_h.erl index 7d9ae66b7..45c7fa9d2 100644 --- a/src/ejabberd_logger_h.erl +++ b/src/ejabberd_logger_h.erl @@ -151,6 +151,19 @@ write_event(Fd, {Time, {info_msg, _GL, {Pid, Format, Args}}}) -> F = add_node("ERROR: ~p - ~p~n", Pid), file:write(Fd, io_lib:format(T ++ F, [Format,Args])) 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(_, _) -> ok.