summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAdam Kocoloski <kocolosk@apache.org>2010-06-13 15:09:59 +0000
committerAdam Kocoloski <kocolosk@apache.org>2010-06-13 15:09:59 +0000
commit09d583a802602bbfc09e1cdb57d9d596b8418be7 (patch)
tree4c7a53748923a43a485a2f1ace5bfeefcd85380f /src
parent3c83fe3827bcebf1e8bc8c5c16af1ad9fd9e0555 (diff)
hack for log requests during make check, when logger is not running
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@954240 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-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}).