Sha256: 5ee4d0c09bc7c3efa3992d9caa110c90f0cb08691e4d69333798f10968dbd72e
Contents?: true
Size: 738 Bytes
Versions: 14
Compression:
Stored size: 738 Bytes
Contents
require 'logger' module Terraspace class Logger < ::Logger def initialize(*args) super self.formatter = Formatter.new self.level = ENV['TS_LOG_LEVEL'] || :info # note: only respected when config.logger not set in config/app.rb end def format_message(severity, datetime, progname, msg) line = if @logdev.dev == $stdout || @logdev.dev == $stderr msg # super simple format if stdout else super # use the configured formatter end line =~ /\n$/ ? line : "#{line}\n" end # Used to allow terraform output to always go to stdout # Terraspace output goes to stderr by default # See: terraspace/shell.rb def stdout(msg) puts msg end end end
Version data entries
14 entries across 14 versions & 1 rubygems