From 523239d5a7c1a5d732de7e3960bc4039b35eefe2 Mon Sep 17 00:00:00 2001 From: Badlop Date: Thu, 25 Jun 2009 18:05:12 +0000 Subject: [PATCH] Don't use lists:keyfind/3 bcause it was introduced only in recent R13A. SVN Revision: 2341 --- src/ejabberd_loglevel.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ejabberd_loglevel.erl b/src/ejabberd_loglevel.erl index 2a340606b..dcb23d8a5 100644 --- a/src/ejabberd_loglevel.erl +++ b/src/ejabberd_loglevel.erl @@ -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.