Class: Lamian::Config

Inherits:
Struct
  • Object
show all
Defined in:
lib/lamian/config.rb

Overview

General lamian configuration class

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



20
21
22
23
24
25
26
# File 'lib/lamian/config.rb', line 20

def initialize
  self.formatter = ::Logger::Formatter.new
  self.max_log_lines = 5000
  self.max_log_length = 10_000
  self.raven_log_size_limit = 500_000
  self.middleware_autoset = true
end

Instance Attribute Details

#formatterLogger::Foramtter

formatter to use in lamian, global

Returns:

  • (Logger::Foramtter)

    the current value of formatter



13
14
15
# File 'lib/lamian/config.rb', line 13

def formatter
  @formatter
end

#max_log_lengthObject

Returns the value of attribute max_log_length

Returns:

  • (Object)

    the current value of max_log_length



13
14
15
# File 'lib/lamian/config.rb', line 13

def max_log_length
  @max_log_length
end

#max_log_linesInteger

max number of most recent log lines to store, defaults to 5000

Returns:

  • (Integer)

    the current value of max_log_lines



13
14
15
# File 'lib/lamian/config.rb', line 13

def max_log_lines
  @max_log_lines
end

#middleware_autosetBOolean

automatically setup a middleware module during rails initialization process

Returns:

  • (BOolean)

    the current value of middleware_autoset



13
14
15
# File 'lib/lamian/config.rb', line 13

def middleware_autoset
  @middleware_autoset
end

#raven_log_size_limitInteger

size limit when sending lamian log to sentry, defaults to 500_000

Returns:

  • (Integer)

    the current value of raven_log_size_limit



13
14
15
# File 'lib/lamian/config.rb', line 13

def raven_log_size_limit
  @raven_log_size_limit
end