Rails 3 Not registered in development

I tried calling both logger.debug, and Rails.logger.debug, but nothing is output to the development.log file. Any ideas on what's going on?

Update

I should also note that I call this from the controller and that other information, such as SQL queries, is output to the log file.

Source

https://github.com/kyledecot/skateparks-web

Gemfile

source 'http://rubygems.org/'

gem 'rails', '3.0.7'
gem 'rake', '~> 0.8.7'
gem 'devise'
gem 'omniauth'
gem 'flash_cookie_session'
gem 'carrierwave'
gem 'mini_magick'
gem 'barometer'
gem 'gdata_19', :require => 'gdata'
gem 'google_places'
gem 'fleakr'
gem 'resque'
gem 'nokogiri'
gem 'decent_exposure'
gem 'cancan'
gem 'friendly_id'
gem 'breadcrumbs_on_rails'
gem 'defensio'
gem 'twitter'
gem 'thinking-sphinx', :require => 'thinking_sphinx'
gem 'ts-resque-delta', '1.0.0', :require => 'thinking_sphinx/deltas/resque_delta'
gem 'mime-types', :require => 'mime/types'
gem 'vpim'
gem 'will_paginate', '~> 3.0.pre2'
gem 'acts_as_geocodable'
gem 'acts_as_audited', '2.0.0.rc7'
gem 'passenger'
gem 'paper_trail'
gem 'thin'
gem 'compass', '>= 0.11.1'
gem 'guard-compass'
gem 'redcarpet'
gem 'mysql2', '0.2.7'
gem 'placemaker'

group :development, :test do

  gem 'sqlite3'
  gem 'capybara'  
  gem 'launchy'
  gem "rspec-rails"
  gem 'rb-fsevent', :require => false if RUBY_PLATFORM =~ /darwin/i
  gem 'guard-rspec'
  gem 'guard-bundler'
  gem 'guard-delayed'
  gem 'factory_girl'
  gem 'rspec'

end

group :production do 
end

enviornment.rb

require File.expand_path('../application', __FILE__)
Skateparks::Application.initialize!
ActiveRecord::Base.logger.level = Logger::INFO

ImagesController

def server
  logger.warn "WARN!" # nothing
  logger.info "INFO!" # nothing
  logger.debug "DEBUG!" # nothing
  puts Rails.logger.inspect # shows
  puts "PUTS!" # shows
end

Log output with rails s

#<ActiveSupport::BufferedLogger:0x000001058867a0 @level=0, @buffer={}, @auto_flushing=1, @guard=#<Mutex:0x000001058866b0>, @log=#<File:/Users/Kyle/Desktop/skateparks-web/log/development.log>>
PUTS!


Started GET "/images/fd3b38315c30532b3a55bb84d35e5925/34_m.png" for 127.0.0.1 at 2011-06-29 03:41:50 -0400
  User Load (0.3ms)  SELECT `users`.* FROM `users` WHERE `users`.`id` = 1 LIMIT 1
+5
source share
2 answers

UPDATE:

Viget Labs removed the recordable stone from his repo ( https://github.com/vigetlabs/loggable )


vigetlabs/loggable. Gemfile.lock, , "fleakr" .

, logger.info "hello" , Rails.logger.info "hello" .

, - , LoggerStub:

class LoggerStub

  [:debug, :error, :fatal, :info, :warn].each do |method|
    class_eval <<-CODE
      def #{method}(message); nil; end
    CODE
  end

end

, , logger, .info .. . nil.

, ( , ), , .

:

UPDATE

..

class ActionController::Base
    self.class.logger = Rails.logger
end

.. , . , class ActiveRecord::Base.

, , , . "" fleakr loggable , , .

UPDATE

, fleakr loggable fork mediashelf: fork Rails , .

+10

: GET "/images/92131721fcf3b8beb12b6e55014b9976/41_m.png"

... : show , : index?

(, , ...)

0

All Articles