add a nil catch to timestamp file sink
an additional nil guard is needed here just to be sure
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user