Class: CourseraDownloader::LogFormatter
- Inherits:
-
Logger::Formatter
- Object
- Logger::Formatter
- CourseraDownloader::LogFormatter
- Defined in:
- lib/coursera_downloader/log_formatter.rb
Instance Method Summary collapse
Instance Method Details
#call(severity, time, progname, msg) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/coursera_downloader/log_formatter.rb', line 6 def call(severity, time, progname, msg) case severity when "INFO" severity = severity.green when "WARN" severity = severity.yellow when "ERROR" severity = severity.red end "#{severity}: #{msg}\n" end |