Class: Bunyan::Logger::Config
- Inherits:
-
Object
- Object
- Bunyan::Logger::Config
- Extended by:
- ConfigurableMethods
- Defined in:
- lib/bunyan/config.rb
Instance Method Summary collapse
- #[](meth) ⇒ Object
- #abort_on_failed_reconnect? ⇒ Boolean
- #disabled? ⇒ Boolean
-
#initialize ⇒ Config
constructor
A new instance of Config.
-
#size(new_size = nil) ⇒ Object
(also: #size=)
default size is 50 megabytes.
Constructor Details
#initialize ⇒ Config
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
23 24 25 |
# File 'lib/bunyan/config.rb', line 23 def abort_on_failed_reconnect? !!@abort_on_failed_reconnect end |
#disabled? ⇒ 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 |