Class: Hanami::Components::App::Logger Private

Inherits:
Object
  • Object
show all
Defined in:
lib/hanami/components/app/logger.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

hanami/logger configuration for a sigle Hanami application in the project.

Since:

  • 0.9.0

Class Method Summary collapse

Class Method Details

.resolve(app) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Configure hanami/logger for a single Hanami application in the project.

Parameters:

Since:

  • 0.9.0



17
18
19
20
21
22
23
24
25
26
# File 'lib/hanami/components/app/logger.rb', line 17

def self.resolve(app)
  namespace = app.namespace
  return unless namespace.logger.nil?

  config = app.configuration

  # TODO: review this logic
  config.logger.app_name(namespace.to_s)
  namespace.logger = config.logger.build
end