diff --git a/HISTORY b/HISTORY index aa745ec..7cb8883 100644 --- a/HISTORY +++ b/HISTORY @@ -8,4 +8,13 @@ Version 0.0.3 27-Nov-2009 ------------------------- - Various minor cleanups - Added Evgeniy Dolzhenko's changes to allow disabling on the fly and setting trace depth -- Pushed gem to gemcu \ No newline at end of file +- Pushed gem to gemcutter + +Version 0.1.0 18-Feb-2010 +------------------------- +- Added QueryTrace.toggle! and QueryTrace.enabled? [Doug Barth] +- Rails integration for toggling tracing with SIGQUIT (CTRL-\) [Doug Barth] + +Version 0.1.1 18-Feb-2010 +------------------------- +Better example in readme \ No newline at end of file diff --git a/README b/README index c71df3a..ece9723 100644 --- a/README +++ b/README @@ -29,6 +29,20 @@ accessor: QueryTrace.depth = 5 +== Runtime Toggling of QueryTrace + +Starting with version 0.1.0 of QueryTrace, you can toggle tracing on or off without restarting the +server (thanks to Doug Barth for implementing this). To do so, include QueryTrace in your environment so that +it loads at server startup; you can use an initializer to set its initial state (on or off). Then just +send SIGQUIT (CTRL-\) to your server to switch from enabled to disabled and vice versa. + +Important note: initializers load after environment.rb, but before environment-specific configuration +files like development.rb. So make sure you have the QueryTrace gem loaded in environment.rb or +the runtime toggling will not work. You can use an initializer to selectively turn it on in +development: + +QueryTrace.enable! if Rails.env.development? + == Example Before: diff --git a/query_trace.gemspec b/query_trace.gemspec index a876a60..4e18d86 100644 --- a/query_trace.gemspec +++ b/query_trace.gemspec @@ -2,7 +2,7 @@ Gem::Specification.new do |s| s.name = %q{query_trace} - s.version = "0.0.3" + s.version = "0.1.0" s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= s.authors = ["Nathaniel Talbott", "Mike Gunderloy"]