summaryrefslogtreecommitdiffhomepage
path: root/dragon/trace.rb
diff options
context:
space:
mode:
Diffstat (limited to 'dragon/trace.rb')
-rw-r--r--dragon/trace.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/dragon/trace.rb b/dragon/trace.rb
index d038ce5..3d92ba2 100644
--- a/dragon/trace.rb
+++ b/dragon/trace.rb
@@ -65,7 +65,7 @@ module GTK
@traced_classes.clear
$trace_enabled = false
if !$gtk.production
- $gtk.write_file 'logs/trace.txt', "Add trace!(SOMEOBJECT) to the top of `tick` and this file will be populated with invocation information.\n"
+ $gtk.write_file_root 'logs/trace.txt', "Add trace!(SOMEOBJECT) to the top of ~tick~ and this file will be populated with invocation information.\n"
end
end
@@ -96,14 +96,15 @@ module GTK
if $trace_puts.length > 0
text = $trace_puts.join("").strip + "\n" + self.trace_times_string + "\n"
if pad_with_newline
- $gtk.append_file 'logs/trace.txt', "\n" + text
+ $gtk.append_file_root 'logs/trace.txt', "\n" + text.strip
else
- $gtk.append_file 'logs/trace.txt', text
+ $gtk.append_file_root 'logs/trace.txt', text.strip
end
end
$trace_puts.clear
end
+ # @gtk
def self.trace! instance = nil
$trace_history ||= []
$trace_enabled = true