Commit ceb52456 authored by Heinz N. Gies's avatar Heinz N. Gies

Some nicer configs

parent 0dee9326
......@@ -10,6 +10,12 @@
[{default, 1209600},
{datatype, integer}]}.
{mapping, "dqe.debug_folder", "dqe.debug_folder",
[{default, "/var/tmp"},
{datatype, directory}]}.
%% Directory for query logs to be written to
{mapping, "dqe.debug.folder", "dqe.debug_folder",
[{default, "/var/tmp"},
{datatype, directory}]}.
%% Default time for a query to be considered slow
{mapping, "dqe.debug.max_time", "dqe.debug_slow",
[{default, "5s"},
{datatype, {duration, ms}}]}.
......@@ -242,9 +242,10 @@ debug_file() ->
<<T/binary, "-", ID/binary>>.
do_debug(Opts) ->
SlowDflt = application:get_env(dqe, debug_slow, 5000),
case {proplists:get_bool(debug, Opts),
proplists:get_bool(log_slow_queries, Opts),
proplists:get_value(slow_ms, Opts, 5000)} of
proplists:get_value(slow_ms, Opts, SlowDflt)} of
%% If debug is set true we always debug
{true, _, _} ->
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment