Sha256: 55bf2325e8855e123b89c6dc069e220126fbb39b2cca60dc980b7020db966c0b

Contents?: true

Size: 512 Bytes

Versions: 73

Compression:

Stored size: 512 Bytes

Contents

Inferno::Application.boot(:logging) do
  init do
    logger =
      if Inferno::Application.env == :test
        log_file_directory = File.join(Dir.pwd, 'tmp')
        FileUtils.mkdir_p(log_file_directory)
        log_file_path = File.join(log_file_directory, 'test.log')
        log_file = File.open(log_file_path, File::WRONLY | File::APPEND | File::CREAT)
        Logger.new(log_file)
      else
        Logger.new($stdout)
      end

    logger.level = Logger::INFO

    register('logger', logger)
  end
end

Version data entries

73 entries across 73 versions & 1 rubygems

Version Path
inferno_core-0.4.35 lib/inferno/config/boot/logging.rb
inferno_core-0.4.34 lib/inferno/config/boot/logging.rb
inferno_core-0.4.33 lib/inferno/config/boot/logging.rb
inferno_core-0.4.32 lib/inferno/config/boot/logging.rb
inferno_core-0.4.31 lib/inferno/config/boot/logging.rb
inferno_core-0.4.30 lib/inferno/config/boot/logging.rb
inferno_core-0.4.29 lib/inferno/config/boot/logging.rb
inferno_core-0.4.28 lib/inferno/config/boot/logging.rb
inferno_core-0.4.27 lib/inferno/config/boot/logging.rb
inferno_core-0.4.26 lib/inferno/config/boot/logging.rb
inferno_core-0.4.25 lib/inferno/config/boot/logging.rb
inferno_core-0.4.24 lib/inferno/config/boot/logging.rb
inferno_core-0.4.23 lib/inferno/config/boot/logging.rb
inferno_core-0.4.22 lib/inferno/config/boot/logging.rb
inferno_core-0.4.21 lib/inferno/config/boot/logging.rb
inferno_core-0.4.20 lib/inferno/config/boot/logging.rb
inferno_core-0.4.19 lib/inferno/config/boot/logging.rb
inferno_core-0.4.18 lib/inferno/config/boot/logging.rb
inferno_core-0.4.17 lib/inferno/config/boot/logging.rb
inferno_core-0.4.16 lib/inferno/config/boot/logging.rb