Module: SqlTracer::Config

Defined in:
lib/sql_tracer/config.rb

Constant Summary collapse

DEFAULTS =
{
  SQL_TRACER_SKIP_LIB_PATH: false, # method call paths in /.rvm directory won't be output, default true
  SQL_TRACER_CONSOLE_OUTPUT_DISABLED: true, # sqls won't be output in back-end console if set to true, default false
  SQL_TRACER_OUTPUT_SELECT_SQL_ENABLED: false, # output select type sql. By default, only (insert|update|delete) sql will be output
  # sql which contains any element of this array won't be output
  SQL_TRACER_SQL_FILTER: [],
  # request url which contains any element of this array won't be output
  SQL_TRACER_URL_FILTER: [],
  # call stack path which contains any element of this array won't be output
  SQL_TRACER_PATH_FILTER: []
}.freeze

Class Method Summary collapse

Class Method Details

.get(name) ⇒ Object



15
16
17
18
# File 'lib/sql_tracer/config.rb', line 15

def self.get(name)
  @config ||= load_config
  (@config && @config[name.to_s]) ? @config[name.to_s] : DEFAULTS[name]
end