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/09/12 20:09:00 UTC

[couchdb] 17/28: 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 22377825b719c0e522bf636cdae892120671c9b4
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 c6840cf..c1d2aec 100644
--- a/src/couch/src/couch_server.erl
+++ b/src/couch/src/couch_server.erl
@@ -699,6 +699,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>.