Parent

Class/Module Index [+]

Quicksearch

Fog::Logger

Public Class Methods

[](channel) click to toggle source
# File lib/fog/core/logger.rb, line 11
def self.[](channel)
  @channels[channel]
end
[]=(channel, value) click to toggle source
# File lib/fog/core/logger.rb, line 15
def self.[]=(channel, value)
  @channels[channel] = value
end
debug(message) click to toggle source
# File lib/fog/core/logger.rb, line 19
def self.debug(message)
  self.write(:debug, "[light_black][DEBUG] #{message}[/]\n")
end
deprecation(message) click to toggle source
# File lib/fog/core/logger.rb, line 23
def self.deprecation(message)
  self.write(:deprecation, "[yellow][DEPRECATION] #{message}[/]\n")
end
warning(message) click to toggle source
# File lib/fog/core/logger.rb, line 27
def self.warning(message)
  self.write(:warning, "[yellow][WARNING] #{message}[/]\n")
end
write(key, value) click to toggle source
# File lib/fog/core/logger.rb, line 31
def self.write(key, value)
  if channel = @channels[key]
    value.gsub(Formatador::INDENT_REGEX, '')
    message = if channel.tty?
      value.gsub(Formatador::PARSE_REGEX) { "\e[#{Formatador::STYLES[$1.to_sym]}m" }.gsub(Formatador::INDENT_REGEX, '')
    else
      value.gsub(Formatador::PARSE_REGEX, '').gsub(Formatador::INDENT_REGEX, '')
    end
    channel.write(message)
  end
  nil
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.