This commit is contained in:
ethicalhack3r
2014-12-15 16:00:30 +01:00
parent 3a3376ec41
commit 85971e0e91
3 changed files with 13 additions and 7 deletions

View File

@@ -49,11 +49,9 @@ end
# Override for puts to enable logging
def puts(o = '')
if @log
if o.respond_to?(:gsub)
temp = o.gsub(/\e\[\d+m/, '') # remove color for logging
File.open(LOG_FILE, 'a+') { |f| f.puts(temp) }
end
if $log && o.respond_to?(:gsub)
temp = o.gsub(/\e\[\d+m/, '') # remove color for logging
File.open(LOG_FILE, 'a+') { |f| f.puts(temp) }
end
super(o)