1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

21 commits

Author SHA1 Message Date
Aaron Patterson
572c3d5178 * BufferedLogger is deprecated. Use ActiveSupport::Logger, or the logger
from Ruby stdlib.
2011-12-19 18:41:37 -08:00
José Valim
27f0add3f9 Improve docs for Rails::Application and add routes_reloader_hook and app_reloader_hooks. 2011-12-12 15:18:19 +01:00
Aaron Patterson
04ef93dae6 * ActiveSupport::BufferedLogger#silence is deprecated. If you want to squelch
logs for a certain block, change the log level for that block.

*   ActiveSupport::BufferedLogger#open_log is deprecated.  This method should
    not have been public in the first place.

*   ActiveSupport::BufferedLogger's behavior of automatically creating the
    directory for your log file is deprecated.  Please make sure to create the
    directory for your log file before instantiating.

*   ActiveSupport::BufferedLogger#auto_flushing is deprecated.  Either set the
    sync level on the underlying file handle like this:

        f = File.open('foo.log', 'w')
        f.sync = true
        ActiveSupport::BufferedLogger.new f

    Or tune your filesystem.  The FS cache is now what controls flushing.

*   ActiveSupport::BufferedLogger#flush is deprecated.  Set sync on your
    filehandle, or tune your filesystem.
2011-12-09 16:05:57 -08:00
David Heinemeier Hansson
afde6fdd5e Added X-Request-Id tracking and TaggedLogging to easily log that and other production concerns 2011-10-19 12:59:33 -05:00
José Valim
eb367afeed rake assets:precompile loads the application but does not initialize it.
To the app developer, this means configuration add in
config/initializers/* will not be executed.

Plugins developers need to special case their initializers that are
meant to be run in the assets group by adding :group => :assets.

Conflicts:

	railties/CHANGELOG
	railties/test/application/assets_test.rb
2011-09-24 03:17:23 +02:00
Aaron Patterson
44f07098fe dealing with some -w warnings on startup 2011-08-24 13:25:11 -07:00
José Valim
c444b0f67b ADdd missing requires (thanks to @arunagw) 2011-05-07 13:35:21 +02:00
Jason Rudolph
59982acd63 Always flush logger at exit
Prior to this change, running code via script/runner would demonstrate
different logging behavior than running the same code via a rake task.
In production mode the script/runner approach would always flush the
logger, but the rake-based approach would not automatically flush the
logger. This discrepancy violates the principle of least surprise, and
it could lead to the loss of important production logging data.

This change removes special-case code in the "runner" command, and
replaces it with a general solution to ensure that the logger gets
flushed at exit. This solution works for "runner", "console", "server",
rake tasks, and any other process that loads the Rails environment.
2011-05-06 12:21:21 -04:00
John Firebaugh
e683ab7c39 Use AD::Reloader.to_cleanup for reloading [#2873 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-12-20 12:43:02 +01:00
José Valim
d649bf158b Provide a cleaner syntax for paths configuration that does not rely on method_missing. 2010-10-06 17:20:15 +02:00
Piotr Sarnacki
7cccfed594 Allow Engines loading its own environment file from config/environments 2010-09-03 22:59:04 +02:00
José Valim
312f433241 Clear DescendantsTracker on each request. 2010-06-19 17:51:44 +02:00
José Valim
19d8c8cbe4 Remove the laziness from the middleware stack. 2010-05-29 22:29:46 +02:00
wycats
9cfeefb637 Reorganized initializers a bit to enable better hooks for common cases without the need for Railtie. Specifically, the following hooks were added:
* before_configuration: this hook is run immediately after the Application class 
  comes into existence, but before the user has added any configuration. This is
  the appropriate place to set configuration for your plugin
* before_initialize: This is run after all of the user's configuration has completed,
  but before any initializers have begun (in other words, it runs right after
  config/environments/{development,production,test}.rb)
* after_initialize: This is run after all of the initializers have run. It is an
  appropriate place for forking in a preforking setup

Each of these hooks may be used via ActiveSupport.on_load(name) { }. In all these cases, the context inside the block will be the Application object. This means that for simple cases, you can use these hooks without needing to create a Railtie.
2010-05-15 06:09:07 -07:00
José Valim
1b816d5024 The rake task :environment now loads config/environment.rb instead of initializing the application on its own. This fixes [#4492 state:resolved] and also avoids the application being initialized twice in some rake tasks. 2010-04-29 08:39:52 +02:00
Carlhuda
b01db07a9f Moved initializers for ActionMailer and ActionController into their own railties 2010-03-02 12:32:31 -08:00
Prem Sichanugrist
f0523f72b4 Rename Rails::Subscriber to Rails::LogSubscriber 2010-02-16 22:36:15 +01:00
José Valim
5d07869245 Ensure all initializers are collections. 2010-01-26 00:08:08 +01:00
José Valim
02908e1142 As first step setup the load path and lazy compare middlewares. 2010-01-25 22:59:08 +01:00
José Valim
b92608770e Ensure environment config has higher priority than application ones. 2010-01-24 12:15:46 +01:00
José Valim
4f03603215 Break application.rb file in smaller chunks. 2010-01-23 16:07:20 +01:00