From 09d583a802602bbfc09e1cdb57d9d596b8418be7 Mon Sep 17 00:00:00 2001 From: Adam Kocoloski Date: Sun, 13 Jun 2010 15:09:59 +0000 Subject: 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 --- src/couchdb/couch_log.erl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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}). -- cgit v1.2.3