Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
21 lines (16 sloc) 340 Bytes
#!/usr/bin/ruby
begin
require 'hirb' # sudo gem install cldwalker-hirb --source http://gems.github.com
Hirb.enable
rescue LoadError
end
def change_log(stream)
ActiveRecord::Base.logger = Logger.new(stream)
ActiveRecord::Base.clear_active_connections!
end
def show_log
change_log(STDOUT)
end
def hide_log
change_log(nil)
end