| Class | Webgen::GUI::Logger |
| In: |
lib/webgen/gui/main.rb
|
| Parent: | Webgen::Logger |
# File lib/webgen/gui/main.rb, line 31
31: def format_message( severity, timestamp, msg, progname )
32: color = case severity
33: when 'ERROR' then '#ff0000'
34: when 'WARN' then '#880000'
35: when 'INFO' then '#008800'
36: when 'DEBUG' then '#aaaaaa'
37: end
38: msg.gsub!(/&/, '&')
39: msg.gsub!(/>/, '>')
40: msg.gsub!(/</, '<')
41: "<font color=#{color}><b>%s</b> %5s -- %s: %s</font>" % [timestamp, severity, progname, msg ]
42: end