Open kreeger opened 11 years ago
Thanks for pointing it out! A pull request would be awesome, otherwise I'll try to get to it when I can but I haven't had much time to play with Rails 4 yet.
http://edgeguides.rubyonrails.org/4_0_release_notes.html#active-support-deprecations
BufferedLogger is deprecated. Use ActiveSupport::Logger, or the logger from Ruby stdlib.
I simply replaced all ActiveSupport::BufferedLogger
with ActiveSupport::Logger
. Because I haven't had time to do the "if..else.." work yet. This solution results in a version that may break rails 3.x. So I simply use
gem 'better_logging', github: 'snow/better_logging'
in rails4 projects and origin gem in rails3 projects.
And this folk is only intend for temporary use till the origin gem release a version that supports rails 4.
sorry for my broken Englisth.
Thanks, I'll try to find the time to do it in a conditional way.
and, in lib/better_logging/better_logging.rb, ln 32, should use Rails::VERSION::MAJOR
instead of Rails.version.to_i
, because Rails.version maybe '4.0.0.beta1'
https://github.com/snow/better_logging/commit/ac2a741fe1747e9d833e09656fcfb250c0777575
Thanks!
Update for Rails 4 coming as soon as I have time.
Actually, when I switch to this other fork (on rails 4), the output is now empty, like this:
=> Booting Thin
=> Rails 4.1.0 application starting in development on http://0.0.0.0:3000
=> Run `rails server -h` for more startup options
=> Notice: server is listening on all interfaces (0.0.0.0). Consider using 127.0.0.1 (--binding option)
=> Ctrl-C to shutdown server
Thin web server (v1.6.3 codename Protein Powder)
Maximum connections set to 1024
Listening on 0.0.0.0:3000, CTRL+C to stop
DEBUG
DEBUG
INFO
INFO
INFO
DEBUG
DEBUG
INFO
INFO
INFO
INFO
Sorry, I'm not maintaining (or even using) this any more, but check @foodforarabbit's fork:
A bit ahead of the curve, perhaps, but I'm getting an error at runtime when I boot up a Rails 4 (beta1) server; evidently
ActiveSupport::BufferedLogger
is no more.If/when I have time, I may submit a pull request to see if I can fix this, unless someone else beats me to it.