summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul J. Davis <paul.joseph.davis@gmail.com>2017-05-30 11:40:35 -0500
committerPaul J. Davis <paul.joseph.davis@gmail.com>2017-05-30 11:40:35 -0500
commit0d8a45f19a8002e5760b171270bc4ce5d7910a06 (patch)
tree827f45cfa957ba2e84ab4a25ab06c42b43b32aaa
parent6ef99bd9f58220cde4cd526a008c760b458dac19 (diff)
downloadcouchdb-0d8a45f19a8002e5760b171270bc4ce5d7910a06.tar.gz
Add a log message for misconfigured default engine
If a user sets the default engine to something that's not a key in the couchdb_engines section of the config we'll now log a helpful error message alerting them to that fact.
-rw-r--r--src/couch/src/couch_server.erl5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/couch/src/couch_server.erl b/src/couch/src/couch_server.erl
index 42f34421b..986cc343c 100644
--- a/src/couch/src/couch_server.erl
+++ b/src/couch/src/couch_server.erl
@@ -669,6 +669,11 @@ get_default_engine(Server, DbName) ->
{Extension, Module} ->
{Module, make_filepath(RootDir, DbName, Extension)};
false ->
+ Fmt = "Invalid storage engine extension ~s,"
+ " configured engine extensions are: ~s",
+ Exts = [E || {E, _} <- Engines],
+ Args = [Extension, string:join(Exts, ", ")],
+ couch_log:error(Fmt, Args),
Default
end;
_ ->