aboutsummaryrefslogtreecommitdiff
path: root/src/ejabberd_logger_h.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/ejabberd_logger_h.erl')
-rw-r--r--src/ejabberd_logger_h.erl14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/ejabberd_logger_h.erl b/src/ejabberd_logger_h.erl
index e356c649b..ce18c5e12 100644
--- a/src/ejabberd_logger_h.erl
+++ b/src/ejabberd_logger_h.erl
@@ -117,7 +117,7 @@ reopen_log() ->
write_event(Fd, {Time, {error, _GL, {Pid, Format, Args}}}) ->
T = write_time(Time),
case catch io_lib:format(add_node(Format,Pid), Args) of
- S when list(S) ->
+ S when is_list(S) ->
file:write(Fd, io_lib:format(T ++ S, []));
_ ->
F = add_node("ERROR: ~p - ~p~n", Pid),
@@ -126,7 +126,7 @@ write_event(Fd, {Time, {error, _GL, {Pid, Format, Args}}}) ->
write_event(Fd, {Time, {emulator, _GL, Chars}}) ->
T = write_time(Time),
case catch io_lib:format(Chars, []) of
- S when list(S) ->
+ S when is_list(S) ->
file:write(Fd, io_lib:format(T ++ S, []));
_ ->
file:write(Fd, io_lib:format(T ++ "ERROR: ~p ~n", [Chars]))
@@ -145,7 +145,7 @@ write_event(Fd, {Time, {info_report, _GL, {Pid, std_info, Rep}}}) ->
write_event(Fd, {Time, {info_msg, _GL, {Pid, Format, Args}}}) ->
T = write_time(Time, "INFO REPORT"),
case catch io_lib:format(add_node(Format,Pid), Args) of
- S when list(S) ->
+ S when is_list(S) ->
file:write(Fd, io_lib:format(T ++ S, []));
_ ->
F = add_node("ERROR: ~p - ~p~n", Pid),
@@ -154,7 +154,7 @@ write_event(Fd, {Time, {info_msg, _GL, {Pid, Format, Args}}}) ->
write_event(_, _) ->
ok.
-format_report(Rep) when list(Rep) ->
+format_report(Rep) when is_list(Rep) ->
case string_p(Rep) of
true ->
io_lib:format("~s~n",[Rep]);
@@ -171,7 +171,7 @@ format_rep([Other|Rep]) ->
format_rep(_) ->
[].
-add_node(X, Pid) when atom(X) ->
+add_node(X, Pid) when is_atom(X) ->
add_node(atom_to_list(X), Pid);
add_node(X, Pid) when node(Pid) /= node() ->
lists:concat([X,"** at node ",node(Pid)," **~n"]);
@@ -183,7 +183,7 @@ string_p([]) ->
string_p(Term) ->
string_p1(Term).
-string_p1([H|T]) when integer(H), H >= $\s, H < 255 ->
+string_p1([H|T]) when is_integer(H), H >= $\s, H < 255 ->
string_p1(T);
string_p1([$\n|T]) -> string_p1(T);
string_p1([$\r|T]) -> string_p1(T);
@@ -192,7 +192,7 @@ string_p1([$\v|T]) -> string_p1(T);
string_p1([$\b|T]) -> string_p1(T);
string_p1([$\f|T]) -> string_p1(T);
string_p1([$\e|T]) -> string_p1(T);
-string_p1([H|T]) when list(H) ->
+string_p1([H|T]) when is_list(H) ->
case string_p1(H) of
true -> string_p1(T);
_ -> false