Class: GitLogger

Inherits:
Cinch::Logger::FormattedLogger
  • Object
show all
Defined in:
lib/gitall/logger.rb

Instance Method Summary collapse

Constructor Details

#initialize(network, *args) ⇒ GitLogger

Returns a new instance of GitLogger.



10
11
12
13
# File 'lib/gitall/logger.rb', line 10

def initialize(network, *args)
  @network = network
  super(*args)
end

Instance Method Details

#format_general(message) ⇒ Object



15
16
17
18
19
20
# File 'lib/gitall/logger.rb', line 15

def format_general(message)
  message.gsub!(/[^[:print:][:space:]]/) do |m|
    colorize(m.inspect[1..-2], :bg_white, :black)
  end
  "[#{@network}] #{message}"
end