class Ec2::CustomLogger
Attributes
trace[W]
Public Class Methods
new(file)
click to toggle source
Calls superclass method
# File lib/ec2/custom_logger.rb, line 7 def initialize(file) super(file) @level = ::Logger::INFO end
Public Instance Methods
bullet(msg)
click to toggle source
# File lib/ec2/custom_logger.rb, line 25 def bullet(msg) puts "#{"\u2219".bold.blue} #{msg}" end
format_message(severity, timestamp, progname, msg)
click to toggle source
# File lib/ec2/custom_logger.rb, line 12 def format_message(severity, timestamp, progname, msg) case severity when "INFO" "#{msg}\n" when "ERROR" "#{severity.bold.red} #{msg}\n" when "WARN" "#{severity.downcase.bold.yellow} #{msg}\n" else "#{severity[0].bold.blue} #{msg}\n" end end
trace?()
click to toggle source
# File lib/ec2/custom_logger.rb, line 29 def trace? @trace end