diff --git a/lib/rex/logging/sinks/timestamp_flatfile.rb b/lib/rex/logging/sinks/timestamp_flatfile.rb index fa560a06a9..4f69219ad6 100644 --- a/lib/rex/logging/sinks/timestamp_flatfile.rb +++ b/lib/rex/logging/sinks/timestamp_flatfile.rb @@ -12,7 +12,7 @@ module Sinks class TimestampFlatfile < Flatfile def log(sev, src, level, msg, from) # :nodoc: - cleaned = msg.gsub(/\x1b\[[0-9;]*[mG]/,'') + cleaned = msg.chop.gsub(/\x1b\[[0-9;]*[mG]/,'') fd.write("[#{get_current_timestamp}] #{cleaned}\n") fd.flush end