class Git::Whistles::Logger

Constants

Colors

Public Class Methods

new(*args) click to toggle source
Calls superclass method
# File lib/git-whistles/logger.rb, line 17
def initialize(*args)
  super
  self.formatter = self.method(:custom_formatter)
end

Public Instance Methods

custom_formatter(severity, time, progname, msg) click to toggle source
# File lib/git-whistles/logger.rb, line 22
def custom_formatter(severity, time, progname, msg)
  msg = msg.sub(/([^¬])$/,"\\1\n").sub(/¬$/,'')
  Term::ANSIColor.send(Colors[severity], msg)
end