Sha256: 0238e2d9764555e4876939267cbba1f0e4a1fb0675028fc02a2ff34dad784d66

Contents?: true

Size: 577 Bytes

Versions: 8

Compression:

Stored size: 577 Bytes

Contents

# coding: utf-8
module I18n::Tasks::Logging
  def warn_deprecated(message)
    log_stderr Term::ANSIColor.yellow Term::ANSIColor.bold "i18n-tasks: [DEPRECATED] #{message}"
  end

  def log_verbose(message)
    if ENV['VERBOSE']
      log_stderr Term::ANSIColor.green "i18n-tasks: #{message}"
    end
  end

  def log_warn(message)
    log_stderr Term::ANSIColor.yellow "i18n-tasks: [WARN] #{message}"
  end

  def log_error(message)
    log_stderr Term::ANSIColor.red Term::ANSIColor.bold "i18n-tasks: #{message}"
  end

  def log_stderr(*args)
    STDERR.puts *args
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
i18n-tasks-0.5.4 lib/i18n/tasks/logging.rb
i18n-tasks-0.5.3 lib/i18n/tasks/logging.rb
i18n-tasks-0.5.2 lib/i18n/tasks/logging.rb
i18n-tasks-0.5.1 lib/i18n/tasks/logging.rb
i18n-tasks-0.5.0 lib/i18n/tasks/logging.rb
i18n-tasks-0.4.5 lib/i18n/tasks/logging.rb
i18n-tasks-0.4.4 lib/i18n/tasks/logging.rb
i18n-tasks-0.4.3 lib/i18n/tasks/logging.rb