25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-24 17:29:28 +01:00

Don't use lists:keyfind/3 bcause it was introduced only in recent R13A.

SVN Revision: 2342
This commit is contained in:
Badlop 2009-06-25 18:05:34 +00:00
parent 82b3790f85
commit ba335346f2

View File

@ -59,8 +59,8 @@ set(_) ->
exit("Loglevel must be an integer").
level_to_integer(Level) ->
case lists:keyfind(Level, 2, ?LOG_LEVELS) of
{Int, Level, _Desc} -> Int;
case lists:keysearch(Level, 2, ?LOG_LEVELS) of
{value, {Int, Level, _Desc}} -> Int;
_ -> erlang:error({no_such_loglevel, Level})
end.