class Fog::Logger
Public Class Methods
[](channel)
click to toggle source
# File lib/fog/core/logger.rb, line 13 def self.[](channel) @channels[channel] end
[]=(channel, value)
click to toggle source
# File lib/fog/core/logger.rb, line 17 def self.[]=(channel, value) @channels[channel] = value end
debug(message)
click to toggle source
# File lib/fog/core/logger.rb, line 21 def self.debug(message) write(:debug, "[light_black][fog][DEBUG] #{message}[/]\n") end
deprecation(message)
click to toggle source
# File lib/fog/core/logger.rb, line 25 def self.deprecation(message) write(:deprecation, "[yellow][fog][DEPRECATION] #{message}[/]\n") end
warning(message)
click to toggle source
# File lib/fog/core/logger.rb, line 29 def self.warning(message) write(:warning, "[yellow][fog][WARNING] #{message}[/]\n") end
write(key, value)
click to toggle source
# File lib/fog/core/logger.rb, line 33 def self.write(key, value) channel = @channels[key] if channel message = if channel.tty? value.gsub(Fog::Formatador::PARSE_REGEX) { "\e[#{Fog::Formatador::STYLES[$1.to_sym]}m" }.gsub(Fog::Formatador::INDENT_REGEX, "") else value.gsub(Fog::Formatador::PARSE_REGEX, "").gsub(Fog::Formatador::INDENT_REGEX, "") end channel.write(message) end nil end