diff options
| author | Dan Healy <[email protected]> | 2020-10-09 19:27:13 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-10-09 19:27:13 -0700 |
| commit | 131acd61d88e559dac3067384a116ee8dec50982 (patch) | |
| tree | 55cfbb4a9842bac5855b588a6c669c9a583b23ec /dragon/trace.rb | |
| parent | 732e813bbc03ab14b89e3f4e2d6196fcd696879e (diff) | |
| parent | cdf663a63bf59af5eddfd6e9f4ba065516082c13 (diff) | |
| download | dragonruby-game-toolkit-contrib-131acd61d88e559dac3067384a116ee8dec50982.tar.gz dragonruby-game-toolkit-contrib-131acd61d88e559dac3067384a116ee8dec50982.zip | |
Merge branch 'master' into performance-tracing
Diffstat (limited to 'dragon/trace.rb')
| -rw-r--r-- | dragon/trace.rb | 7 |
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 |
