diff --git a/lib/rex/logging/sinks/timestamp_flatfile.rb b/lib/rex/logging/sinks/timestamp_flatfile.rb index bb8fe132b8..b7fa229922 100644 --- a/lib/rex/logging/sinks/timestamp_flatfile.rb +++ b/lib/rex/logging/sinks/timestamp_flatfile.rb @@ -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