Class: Memolog::Config

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



10
11
12
13
14
15
16
# File 'lib/memolog/config.rb', line 10

def initialize
  self.debug = false
  self.formatter = Logger::Formatter.new
  self.isolation_level = :thread
  self.log_size_limit = 50_000
  self.middlewares = %i[rails sidekiq]
end

Instance Attribute Details

#debugObject

Returns the value of attribute debug

Returns:

  • (Object)

    the current value of debug



3
4
5
# File 'lib/memolog/config.rb', line 3

def debug
  @debug
end

#formatterObject

Returns the value of attribute formatter

Returns:

  • (Object)

    the current value of formatter



3
4
5
# File 'lib/memolog/config.rb', line 3

def formatter
  @formatter
end

#isolation_levelObject

Returns the value of attribute isolation_level

Returns:

  • (Object)

    the current value of isolation_level



3
4
5
# File 'lib/memolog/config.rb', line 3

def isolation_level
  @isolation_level
end

#log_size_limitObject

Returns the value of attribute log_size_limit

Returns:

  • (Object)

    the current value of log_size_limit



3
4
5
# File 'lib/memolog/config.rb', line 3

def log_size_limit
  @log_size_limit
end

#middlewaresObject

Returns the value of attribute middlewares

Returns:

  • (Object)

    the current value of middlewares



3
4
5
# File 'lib/memolog/config.rb', line 3

def middlewares
  @middlewares
end