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.
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 @@
[_|_] -> lists:last(IniFiles);
_ -> undefined
end,
+ debug_config(),
{ok, #config{write_filename=WriteFile}}.
@@ -214,3 +215,16 @@
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.
+