summaryrefslogtreecommitdiff
path: root/src/couchdb/couch_log.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/couchdb/couch_log.erl')
-rw-r--r--src/couchdb/couch_log.erl6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/couchdb/couch_log.erl b/src/couchdb/couch_log.erl
index 5c8a5e5c..2d62cbb5 100644
--- a/src/couchdb/couch_log.erl
+++ b/src/couchdb/couch_log.erl
@@ -81,7 +81,11 @@ get_level() ->
level_atom(get_level_integer()).
get_level_integer() ->
- ets:lookup_element(?MODULE, level, 2).
+ try
+ ets:lookup_element(?MODULE, level, 2)
+ catch error:badarg ->
+ ?LEVEL_ERROR
+ end.
set_level_integer(Int) ->
gen_event:call(error_logger, couch_log, {set_level_integer, Int}).