diff options
author | Ryan Bigg <radarlistener@gmail.com> | 2010-11-15 11:44:04 +0800 |
---|---|---|
committer | Ryan Bigg <radarlistener@gmail.com> | 2010-11-15 11:44:04 +0800 |
commit | 8b5700192e3baadf236f1d7560c3b9f979b3b56d (patch) | |
tree | 5f13a06bf516d58cf1a6ab2f508aa5e8622c0e7e /railties/guides/source/debugging_rails_applications.textile | |
parent | 74061f55be2ba83f1457369b7e47cab54d26a57f (diff) | |
parent | 72fda46214da24e846a8f3332e153361247902a4 (diff) | |
download | rails-8b5700192e3baadf236f1d7560c3b9f979b3b56d.tar.gz rails-8b5700192e3baadf236f1d7560c3b9f979b3b56d.tar.bz2 rails-8b5700192e3baadf236f1d7560c3b9f979b3b56d.zip |
Merge branch 'master' of github.com:lifo/docrails
* 'master' of github.com:lifo/docrails:
Getting Started guide: remove calls to f.error_messages as it has been removed from Rails
deliver_* is no more
removed unnecessary indentation
added note with example for using flash in redirection
corrected sample code to clear @_current_user class variable also
the partial option is not required for simple partial rendering
colorize_logging is a Rails General Configuration option not a specific option of ActiveRecord
Fixed the name of the 'generator option'
this reads better, i don't know what the other 'so on' are, doesn't help reader imho
added missing word to clear up meaning in my previous commit
Add a note to TextHelpers making explicit their default behavior of not escaping but sanitizing.
removed indentation, for code style consistency and readibility
Use Rails.logger, not ActiveRecord::Base.logger
removed etc. not require
added missing space and minor rewording
corrected to Rails 3 syntax for declaring resources
Fixes ActionMailer example error
Diffstat (limited to 'railties/guides/source/debugging_rails_applications.textile')
-rw-r--r-- | railties/guides/source/debugging_rails_applications.textile | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/railties/guides/source/debugging_rails_applications.textile b/railties/guides/source/debugging_rails_applications.textile index 6eec18b8b9..adf427147b 100644 --- a/railties/guides/source/debugging_rails_applications.textile +++ b/railties/guides/source/debugging_rails_applications.textile @@ -127,8 +127,8 @@ Rails makes use of Ruby's standard +logger+ to write log information. You can al You can specify an alternative logger in your +environment.rb+ or any environment file: <ruby> -ActiveRecord::Base.logger = Logger.new(STDOUT) -ActiveRecord::Base.logger = Log4r::Logger.new("Application Log") +Rails.logger = Logger.new(STDOUT) +Rails.logger = Log4r::Logger.new("Application Log") </ruby> Or in the +Initializer+ section, add _any_ of the following @@ -142,13 +142,13 @@ TIP: By default, each log is created under +Rails.root/log/+ and the log file na h4. Log Levels -When something is logged it's printed into the corresponding log if the log level of the message is equal or higher than the configured log level. If you want to know the current log level you can call the +ActiveRecord::Base.logger.level+ method. +When something is logged it's printed into the corresponding log if the log level of the message is equal or higher than the configured log level. If you want to know the current log level you can call the +Rails.logger.level+ method. The available log levels are: +:debug+, +:info+, +:warn+, +:error+, and +:fatal+, corresponding to the log level numbers from 0 up to 4 respectively. To change the default log level, use <ruby> config.log_level = Logger::WARN # In any environment initializer, or -ActiveRecord::Base.logger.level = 0 # at any time +Rails.logger.level = 0 # at any time </ruby> This is useful when you want to log under development or staging, but you don't want to flood your production log with unnecessary information. |