Sha256: 220f81ae8dc971bf5012819f419b7b784825dde4b25a11b7326b0b025553b73e

Contents?: true

Size: 301 Bytes

Versions: 9

Compression:

Stored size: 301 Bytes

Contents

# frozen_string_literal: true

require 'logger'

# Add logging to classes
module YnabLogger
  def logger
    @logger unless @logger.nil?
    @logger ||= Logger.new(STDERR)
    @logger.level = Logger::FATAL
    @logger.level = Logger::DEBUG if ENV['YNAB_CONVERT_DEBUG'] == 'true'
    @logger
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
ynab_convert-1.0.8 lib/ynab_convert/logger.rb
ynab_convert-1.0.7 lib/ynab_convert/logger.rb
ynab_convert-1.0.6 lib/ynab_convert/logger.rb
ynab_convert-1.0.5 lib/ynab_convert/logger.rb
ynab_convert-1.0.4 lib/ynab_convert/logger.rb
ynab_convert-1.0.3 lib/ynab_convert/logger.rb
ynab_convert-1.0.2 lib/ynab_convert/logger.rb
ynab_convert-1.0.1 lib/ynab_convert/logger.rb
ynab_convert-0.1.0.pre lib/ynab_convert/logger.rb