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 2014/01/17 22:31:26 UTC
[23/28] git commit: Rewrite the boot procedure for the couch app
Rewrite the boot procedure for the couch app
We had a lot of historical cruft lying around from before people knew
hot OTP worked. This does some cleanup to make things a bit more tidy
through this section but we still have a long ways to go.
Project: http://git-wip-us.apache.org/repos/asf/couchdb-config/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-config/commit/5c52779d
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-config/tree/5c52779d
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-config/diff/5c52779d
Branch: refs/heads/import
Commit: 5c52779dc4e70d70b9faa5f5603f2fc0d26259f1
Parents: a352def
Author: Paul J. Davis <pa...@gmail.com>
Authored: Mon Mar 11 16:13:14 2013 -0500
Committer: Paul J. Davis <pa...@gmail.com>
Committed: Fri Jan 17 13:24:59 2014 -0800
----------------------------------------------------------------------
src/config.erl | 14 ++++++++++++++
1 file changed, 14 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb-config/blob/5c52779d/src/config.erl
----------------------------------------------------------------------
diff --git a/src/config.erl b/src/config.erl
index 07f0489..8a94f2c 100644
--- a/src/config.erl
+++ b/src/config.erl
@@ -93,6 +93,7 @@ init(IniFiles) ->
[_|_] -> lists:last(IniFiles);
_ -> undefined
end,
+ debug_config(),
{ok, #config{write_filename=WriteFile}}.
@@ -214,3 +215,16 @@ parse_ini_file(IniFile) ->
end
end, {"", []}, Lines),
{ok, ParsedIniValues}.
+
+
+debug_config() ->
+ case ?MODULE:get("log", "level") of
+ "debug" ->
+ io:format("Configuration Settings:~n", []),
+ lists:foreach(fun({{Mod, Key}, Val}) ->
+ io:format(" [~s] ~s=~p~n", [Mod, Key, Val])
+ end, lists:sort(ets:tab2list(?MODULE)));
+ _ ->
+ ok
+ end.
+