Module: Hyperion::Logger
- Included in:
- Hyperion, Hyperion, FakeServer::Config, Formats
- Defined in:
- lib/hyperion/aux/logger.rb
Instance Method Summary collapse
Instance Method Details
#log_stub(rule) ⇒ Object
17 18 19 20 21 |
# File 'lib/hyperion/aux/logger.rb', line 17 def log_stub(rule) mr = rule.mimic_route logger.debug "Stubbed #{mr.method.to_s.upcase} #{mr.path}" log_headers(rule.headers, logger) end |
#logger ⇒ Object
6 7 8 |
# File 'lib/hyperion/aux/logger.rb', line 6 def logger Logatron end |
#with_request_logging(route, uri, headers) ⇒ Object
10 11 12 13 14 15 |
# File 'lib/hyperion/aux/logger.rb', line 10 def with_request_logging(route, uri, headers) Logatron.log(msg: "Hyperion #{route.method.to_s.upcase} #{uri}") do |logger| log_headers(headers, logger) yield end end |