Created
July 31, 2010 09:19
-
-
Save JonnieCache/501977 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Add rails logging to script/console like in script/server | |
| # to disable it for one run do this command: | |
| # | |
| # RAILS_CONSOLE_LOGGING=off script/console | |
| if ENV.include?('RAILS_ENV') && !Object.const_defined?('RAILS_DEFAULT_LOGGER') && !%w{false off}.include?(ENV['RAILS_CONSOLE_LOGGING']) | |
| require 'logger' | |
| Object.const_set('RAILS_DEFAULT_LOGGER', Logger.new(STDOUT)) | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment