class SqlMetrics::Configuration

Attributes

bots_regex[RW]
database_schema[RW]
db_name[RW]
event_table_name[RW]
host[RW]
logger[RW]
options[RW]
password[RW]
port[RW]
tty[RW]
user[RW]

Public Class Methods

new() click to toggle source
# File lib/sql_metrics/config.rb, line 11
def initialize

  self.host = nil
  self.port = 5432
  self.options = nil
  self.tty = nil
  self.db_name = nil
  self.user = nil
  self.password = nil
  self.database_schema = 'public'
  self.event_table_name = 'events'

  self.bots_regex = /Googlebot|Pingdom|bing|Yahoo|Amazon|Twitter|Yandex|baidu|majestic12/i

  self.logger = defined?(Rails) ? Rails.logger : Logger.new(STDOUT)
end