Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

file 20 lines (16 sloc) 0.34 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
#!/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
Something went wrong with that request. Please try again.