Closed mitya closed 8 years ago
:+1:
👍
👍
in the meantime i used (in an initialzer):
#monkey patch to remove that 'Geokit is using the domain' annoying log.
# to be removed when https://github.com/geokit/geokit-rails/issues/101 is resolved.
# based on $GEM_HOME/gems/geokit-rails-2.2.0/lib/geokit-rails/geocoder_control.rb
module Geokit
module GeocoderControl
def set_geokit_domain
Geokit::Geocoders::domain = request.domain
end
end
end
@mitya @timrogers @AndreiMotinga @boazadato This error message is caused in https://github.com/geokit/geokit-rails/blob/master/lib/geokit-rails/geocoder_control.rb#L17
However it's ONLY occurring in 'debug' which is meant to be quite annoying and provide detail.
Now according to the docs rails does have debug as the default for all environments but it's not recommended. You would generally want debug/info in development, and warn/error in production.
I'm open to changing the log-level of this an other messages, but I would like to hear why this message shouldn't show in a 'debug' setting.
@mnoack while i agree in general, this log line has little value, and to tune the whole environment log lever just for this is rather an overkill. One may want to run in debug and still opt out of certain library logging.
In a lot of gems there's an option to tune that gem specific log level, e.g. mongoid:
config.mongoid.logger = Logger.new($stdout, :warn)
@boazadato I've pushed the removal of that line. I won't release a gem just yet, but you can point to master temporarily. I'll have a look at some other issues and see if there's anything else to merge before doing so.
@mnoack thank a lot. for this and for the whole gem 👍
Thanks for this fix! I was wondering if you had another release of this gem planned - this issue was closed almost 10 months ago. :grin:
@mitya @timrogers @AndreiMotinga @boazadato @pedantic-git geokit-rails 2.3.0 with this fix has been released.
Yes, usually I like to merge, let people people to master for a bit (beta-testers for that and other fixes), then release, but 10 months it's definitely overdue!
Thanks so much!!
Geokit dumps some message to the application log on every single request, I definitely don't found it useful, especially given that I use Geokit only to calculate the distances.