Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6094225
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:39:09+00:00 2026-05-23T12:39:09+00:00

I’ve tried calling both logger.debug and Rails.logger.debug but nothing is getting outputted to the

  • 0

I’ve tried calling both logger.debug and Rails.logger.debug but nothing is getting outputted to the development.log file. Any ideas as to what’s going?

Update

I should also note that I’m calling this from a controller and that other information such as the SQL queries are getting outputted to the log file.

Source Code

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 w/ 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
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T12:39:09+00:00Added an answer on May 23, 2026 at 12:39 pm

    UPDATE:

    Viget Labs has removed the loggable gem from their repo (
    https://github.com/vigetlabs/loggable
    )


    Some gem in your app is using the vigetlabs/loggable gem.
    Looking at Gemfile.lock, it appears that the "fleakr" gem is using it.

    I noted that while logger.info "hello" does not work, Rails.logger.info "hello" works just fine.

    It appears the loggable gem is somehow redefining the logger methods to do nothing using the LoggerStub:

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

    What is happening is that the loggable gem is defining a class variable and instance variable called logger, and the .info etc methods are being called on one of them. And those methods simply return nil.

    I know this is a partial answer (in that it is not a complete solution), but that should be
    good information to get you started on finding the proper solution.

    Take a look also at these files:

    1. log_methods.rb
    2. logger_stub.rb

    UPDATE

    Adding..

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

    ..should forcibly override loggable’s assignment of the logger and things should work normally. I suppose the same would work for class ActiveRecord::Base.

    But of course, this is a brute force solution that does not fix the underlying problem. For a real "fix" you would need to delve further into fleakr or loggable and maybe ask about this problem at the issues page for those gems.

    UPDATE

    See if you can make the fleakr gem use the loggable fork from mediashelf : that fork should use the default Rails logger if it is available.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have just tried to save a simple *.rtf file with some websites and
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I want use html5's new tag to play a wav file (currently only supported
Seemingly simple, but I cannot find anything relevant on the web. What is the
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
I need to clean up various Word 'smart' characters in user input, including but
We are using XSLT to translate a RIXML file to XML. Our RIXML contains

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.