You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by da...@apache.org on 2017/05/30 18:43:18 UTC

[couchdb] 11/13: Add a log message for misconfigured default engine

This is an automated email from the ASF dual-hosted git repository.

davisp pushed a commit to branch COUCHDB-3287-pluggable-storage-engines
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 0d8a45f19a8002e5760b171270bc4ce5d7910a06
Author: Paul J. Davis <pa...@gmail.com>
AuthorDate: Tue May 30 11:40:35 2017 -0500

    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.
---
 src/couch/src/couch_server.erl | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/couch/src/couch_server.erl b/src/couch/src/couch_server.erl
index 42f3442..986cc34 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;
         _ ->

-- 
To stop receiving notification emails like this one, please contact
"commits@couchdb.apache.org" <co...@couchdb.apache.org>.