Land #7713, scriptkittie fix for SessionLogging
lands a fix for loggers not handling a nil message Fix for #7687bug/bundler_fix
commit
ca1cc11d9f
|
@ -12,6 +12,7 @@ module Sinks
|
|||
class TimestampFlatfile < Flatfile
|
||||
|
||||
def log(sev, src, level, msg, from) # :nodoc:
|
||||
return unless msg.present?
|
||||
msg = msg.chop.gsub(/\x1b\[[0-9;]*[mG]/,'').gsub(/[\x01-\x02]/, " ")
|
||||
fd.write("[#{get_current_timestamp}] #{msg}\n")
|
||||
fd.flush
|
||||
|
|
|
@ -272,6 +272,7 @@ module Shell
|
|||
#
|
||||
def print_error(msg='')
|
||||
return if (output.nil?)
|
||||
return if (msg.nil?)
|
||||
|
||||
self.on_print_proc.call(msg) if self.on_print_proc
|
||||
# Errors are not subject to disabled output
|
||||
|
|
Loading…
Reference in New Issue