diff options
author | prajakta <praj.tambe@gmail.com> | 2016-02-24 18:32:54 +0530 |
---|---|---|
committer | prajakta <praj.tambe@gmail.com> | 2016-02-26 15:22:39 +0530 |
commit | 2dc3e81aea8dbca772f320f84e26ba309016dc23 (patch) | |
tree | 45b235d2c15c5f650550943235d2d4fe377dadbc | |
parent | ef06afe29a4e25109c7959d57dcdf55983ec7c23 (diff) | |
download | rails-2dc3e81aea8dbca772f320f84e26ba309016dc23.tar.gz rails-2dc3e81aea8dbca772f320f84e26ba309016dc23.tar.bz2 rails-2dc3e81aea8dbca772f320f84e26ba309016dc23.zip |
- Changed Debugging Rails Applications doc's logger introduction section. Changed location for specifying logger.
[Prajakta, thiagoaugusto]
-rw-r--r-- | guides/source/debugging_rails_applications.md | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/guides/source/debugging_rails_applications.md b/guides/source/debugging_rails_applications.md index 35ad6eb705..713d95a3c1 100644 --- a/guides/source/debugging_rails_applications.md +++ b/guides/source/debugging_rails_applications.md @@ -109,18 +109,18 @@ It can also be useful to save information to log files at runtime. Rails maintai Rails makes use of the `ActiveSupport::Logger` class to write log information. Other loggers, such as `Log4r`, may also be substituted. -You can specify an alternative logger in `environment.rb` or any other environment file, for example: +You can specify an alternative logger in `config/application.rb`, for example: ```ruby -Rails.logger = Logger.new(STDOUT) -Rails.logger = Log4r::Logger.new("Application Log") +config.logger = Logger.new(STDOUT) +config.logger = Log4r::Logger.new("Application Log") ``` Or in the `Initializer` section, add _any_ of the following ```ruby -config.logger = Logger.new(STDOUT) -config.logger = Log4r::Logger.new("Application Log") +Rails.logger = Logger.new(STDOUT) +Rails.logger = Log4r::Logger.new("Application Log") ``` TIP: By default, each log is created under `Rails.root/log/` and the log file is named after the environment in which the application is running. |