Properly removes the colour sequence from log. Fixes #480
This commit is contained in:
@@ -51,7 +51,7 @@ end
|
|||||||
def puts(o = '')
|
def puts(o = '')
|
||||||
# remove color for logging
|
# remove color for logging
|
||||||
if o.respond_to?(:gsub)
|
if o.respond_to?(:gsub)
|
||||||
temp = o.gsub(/\e\[\d+m(.*)?\e\[0m/, '\1')
|
temp = o.gsub(/\e\[\d+m/, '')
|
||||||
File.open(LOG_FILE, 'a+') { |f| f.puts(temp) }
|
File.open(LOG_FILE, 'a+') { |f| f.puts(temp) }
|
||||||
end
|
end
|
||||||
super(o)
|
super(o)
|
||||||
|
|||||||
Reference in New Issue
Block a user