couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikewall...@apache.org
Subject couch-log commit: updated refs/heads/master to e4abbd3
Date Fri, 11 Mar 2016 13:12:10 GMT
Repository: couchdb-couch-log
Updated Branches:
  refs/heads/master 939b3a7bd -> e4abbd387


Remove module_loaded check in get_backend

When the code server loads modules dynamically,
module_loaded(Backend) will not return true until it has actually
been called. Since couch_log is the only thing that calls it this
can result in the backend module never being loaded.

Closes COUCHDB-2968

This closes #11


Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch-log/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch-log/commit/e4abbd38
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch-log/tree/e4abbd38
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch-log/diff/e4abbd38

Branch: refs/heads/master
Commit: e4abbd3874356dc7a201b09676e27ff7dc8bed7c
Parents: 939b3a7
Author: Mike Wallace <mikewallace@apache.org>
Authored: Thu Mar 10 14:15:15 2016 +0000
Committer: Mike Wallace <mikewallace@apache.org>
Committed: Fri Mar 11 13:03:05 2016 +0000

----------------------------------------------------------------------
 src/couch_log.erl | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch-log/blob/e4abbd38/src/couch_log.erl
----------------------------------------------------------------------
diff --git a/src/couch_log.erl b/src/couch_log.erl
index c07f9a4..1047c59 100644
--- a/src/couch_log.erl
+++ b/src/couch_log.erl
@@ -112,11 +112,7 @@ set_level(Level) ->
 -spec get_backend() -> {ok, atom()}.
 get_backend() ->
     BackendName = "couch_log_" ++ config:get("log", "backend", "stderr"),
-    Backend = list_to_existing_atom(BackendName),  %% yes, we need crash here
-    case erlang:module_loaded(Backend) of
-        true -> {ok, Backend};
-        false -> {ok, couch_log_stderr}
-    end.
+    {ok, list_to_existing_atom(BackendName)}.
 
 -ifdef(TEST).
 


Mime
View raw message