From 48102aa6eb4a0212d12cb11c79f91ae4532415d0 Mon Sep 17 00:00:00 2001 From: Meatballs Date: Sun, 21 Jun 2015 19:13:55 +0100 Subject: [PATCH] Strip newlines so we dont add spaces --- lib/rex/logging/sinks/timestamp_flatfile.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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