lib/dexter/client.rb in pgdexter-0.2.1 vs lib/dexter/client.rb in pgdexter-0.3.0

- old
+ new

@@ -27,14 +27,17 @@ opts = Slop.parse(args) do |o| o.banner = %(Usage: dexter [options] Options:) + o.boolean "--analyze", "analyze tables that haven't been analyzed in the past hour", default: false o.boolean "--create", "create indexes", default: false o.array "--exclude", "prevent specific tables from being indexed" o.string "--include", "only include specific tables" + o.string "--input-format", "input format", default: "stderr" o.integer "--interval", "time to wait between processing queries, in seconds", default: 60 + o.float "--min-calls", "only process queries that have been called a certain number of times", default: 0 o.float "--min-time", "only process queries that have consumed a certain amount of DB time, in minutes", default: 0 o.boolean "--pg-stat-statements", "use pg_stat_statements", default: false, help: false o.boolean "--log-explain", "log explain", default: false, help: false o.string "--log-level", "log level", default: "info" o.boolean "--log-sql", "log sql", default: false @@ -61,10 +64,10 @@ options[:dbname] = arguments.shift unless options[:dbname] # TODO don't use global var $log_level = options[:log_level].to_s.downcase - abort "Unknown log level" unless ["error", "info", "debug", "debug2"].include?($log_level) + abort "Unknown log level" unless ["error", "info", "debug", "debug2", "debug3"].include?($log_level) [arguments, options] rescue Slop::Error => e abort e.message end