module I18n::Tasks::Logging
Constants
- MUTEX
- PROGRAM_NAME
Public Instance Methods
Source
# File lib/i18n/tasks/logging.rb, line 21 def log_error(message) log_stderr Rainbow("#{program_name}: #{message}").red.bright end
Source
# File lib/i18n/tasks/logging.rb, line 25 def log_stderr(*args) # We don't want output from different threads to get intermixed. MUTEX.synchronize do $stderr.puts(*args) end end
Source
# File lib/i18n/tasks/logging.rb, line 13 def log_verbose(message = nil) log_stderr Rainbow(message || yield).blue.bright if ::I18n::Tasks.verbose? end
Source
# File lib/i18n/tasks/logging.rb, line 17 def log_warn(message) log_stderr Rainbow("#{program_name}: [WARN] #{message}").yellow end
Source
# File lib/i18n/tasks/logging.rb, line 9 def warn_deprecated(message) log_stderr Rainbow("#{program_name}: [DEPRECATED] #{message}").yellow.bright end