Class: Bunyan::Logger::Config

Inherits:
Object
  • Object
show all
Extended by:
ConfigurableMethods
Defined in:
lib/bunyan/config.rb

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



10
11
12
13
# File 'lib/bunyan/config.rb', line 10

def initialize
  @size     = 52428800
  @disabled = false
end

Instance Method Details

#[](meth) ⇒ Object



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

def [](meth)
  send(meth)
end

#abort_on_failed_reconnect?Boolean

Returns:

  • (Boolean)


23
24
25
# File 'lib/bunyan/config.rb', line 23

def abort_on_failed_reconnect?
  !!@abort_on_failed_reconnect
end

#disabled?Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/bunyan/config.rb', line 19

def disabled?
  !!@disabled
end

#size(new_size = nil) ⇒ Object Also known as: size=

default size is 50 megabytes



28
29
30
# File 'lib/bunyan/config.rb', line 28

def size(new_size = nil)
  new_size.nil? ? @size : @size = new_size
end