Module: StartHer::Logger
- Defined in:
- lib/start_her/logger.rb
Class Method Summary collapse
- .development ⇒ Object
- .instance ⇒ Object
- .production ⇒ Object (also: staging)
- .test ⇒ Object
Class Method Details
.development ⇒ Object
11 12 13 14 15 16 |
# File 'lib/start_her/logger.rb', line 11 def development LogStashLogger.new(type: :multi_delegator, outputs: [ { type: :stdout }, { type: :file, path: 'log/development.log', sync: true } ], formatter: ::Logger::Formatter) end |
.instance ⇒ Object
7 8 9 |
# File 'lib/start_her/logger.rb', line 7 def instance send(StartHer.env) end |
.production ⇒ Object Also known as: staging
18 19 20 21 22 23 |
# File 'lib/start_her/logger.rb', line 18 def production LogStashLogger.new( type: :redis, url: StartHer.config.logstash_url, sync: true).tap do |logger| logger.level = ::Logger::INFO end end |
.test ⇒ Object
28 29 30 |
# File 'lib/start_her/logger.rb', line 28 def test LogStashLogger.new(type: :stdout, formatter: ::Logger::Formatter) end |