customink / central_logger

Ruby Mongo DB Logger for Rails - centralized logging for rails apps in MongoDB. Converted to gem, added global exception logging, and added Rails 3 (or 2) support.
http://blog.philburrows.com/articles/2009/09/28/rails-logging-with-mongodb/
MIT License
128 stars 35 forks source link

deprecation warning on start #21

Closed AlexanderPavlenko closed 12 years ago

AlexanderPavlenko commented 13 years ago

fix «config.paths.app.controller API is deprecated» warning

noefroidevaux commented 12 years ago

Someone can accept the pull request please?

le0pard commented 12 years ago

Hello guys. Sorry for interrupting.

I build gem, which based on yours, but integrate into it web and remove rails 2 support (and add some needed features for me). Here this gem - http://mongodb-logger.catware.org/

But what I want to tell for you. Such code return not file, but folder in rails 3.0.x:

((app_config.paths['log'] rescue nil) || app_config.paths.log.to_a).first => ".../test_rails/log"

And such thing rails exception, because rails try to write into dir "log". Here:

1.9.3p0 :004 > app_config.paths['log'].first => "/Users/leo/programs/projects/rails_cucumber/log" 1.9.3p0 :005 > app_config.paths.log.to_a.first => "/Users/leo/programs/projects/rails_cucumber/log/development.log"

I found now only one way to fix this: https://github.com/le0pard/mongodb_logger/blob/master/lib/mongodb_logger/initializer_mixin.rb#L9

I found such things, because I cover my gem to test on all rails versions, and on such things tests fails (On CI I testing only major versions of rails - http://travis-ci.org/#!/le0pard/mongodb_logger). So you need improve this.

Best Regards, Alexey

astupka commented 12 years ago

@le0pard I will take a look. I am currently upgrading the gem to work with rails 3.1.3.