1
0
Fork 0
mirror of https://github.com/processone/ejabberd synced 2025-10-04 18:29:20 +02:00

Correctly handle unicode in log messages

This commit is contained in:
Evgeny Khramtsov 2019-09-23 15:17:20 +03:00
parent 2e1e128833
commit 5770946f03
124 changed files with 759 additions and 765 deletions

View file

@ -213,7 +213,7 @@ enforce_max_sessions(_LUser, _LServer, infinity) ->
enforce_max_sessions(LUser, LServer, MaxSessions) ->
case lookup_sessions(LUser, LServer) of
{ok, Sessions} when length(Sessions) >= MaxSessions ->
?INFO_MSG("Disabling old push session(s) of ~s@~s",
?INFO_MSG("Disabling old push session(s) of ~ts@~ts",
[LUser, LServer]),
Sessions1 = lists:sort(fun({TS1, _, _, _}, {TS2, _, _, _}) ->
TS1 >= TS2
@ -233,13 +233,13 @@ decode_xdata(XML, LUser, LServer) ->
#xmlel{} = El ->
try xmpp:decode(El)
catch _:{xmpp_codec, Why} ->
?ERROR_MSG("Failed to decode ~s for user ~s@~s "
"from table 'push_session': ~s",
?ERROR_MSG("Failed to decode ~ts for user ~ts@~ts "
"from table 'push_session': ~ts",
[XML, LUser, LServer, xmpp:format_error(Why)]),
undefined
end;
Err ->
?ERROR_MSG("Failed to decode ~s for user ~s@~s from "
?ERROR_MSG("Failed to decode ~ts for user ~ts@~ts from "
"table 'push_session': ~p",
[XML, LUser, LServer, Err]),
undefined