lib/itamae-mitsurin/logger.rb in itamae-mitsurin-0.24 vs lib/itamae-mitsurin/logger.rb in itamae-mitsurin-0.26
- old
+ new
@@ -71,15 +71,12 @@
class Formatter
attr_accessor :colored
def call(severity, datetime, progname, msg)
- log = "%s : %s\n" % ["%5s" % severity, msg2str(msg)]
- if colored
- colorize(log, severity)
- else
- log
- end
+ log = "%s : %s" % ["%5s" % severity, msg2str(msg)]
+
+ (colored ? colorize(log, severity) : log) + "\n"
end
def color(code)
prev_color = @color
@color = code