Fixed timestamped logger cutting off last character (fixes #8597)

bug/bundler_fix
Dirkjan Mollema 2017-06-23 13:19:16 +02:00
parent 2617ae7609
commit 24379f907e
1 changed files with 1 additions and 1 deletions

View File

@ -13,7 +13,7 @@ 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]/, " ")
msg = msg.gsub(/\x1b\[[0-9;]*[mG]/,'').gsub(/[\x01-\x02]/, ' ').gsub(/\s+$/,'')
fd.write("[#{get_current_timestamp}] #{msg}\n")
fd.flush
end