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 6247497
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T12:53:03+00:00 2026-05-24T12:53:03+00:00

Rails 3.0, to the extent it matters. So, ordinarily in development mode, logger messages

  • 0

Rails 3.0, to the extent it matters.

So, ordinarily in development mode, logger messages end up written to
both development.log AND console, if you’re in an interactive console.

Which is just spiffy, fine.

But something I can’t figure out, if I write a logger message during the
boot process (say in config.after_initialize), then this does NOT
happen. The log message is in the log/development.log file, but NOT
written to console. Which is annoying, the reason I’m writing something
out during the boot process (echo’ing certain config) is for the
developer to see it, because it aids in debugging.

Anyone have any idea what’s going on here, and if there’s anything I can
do about it?

  • 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-24T12:53:05+00:00Added an answer on May 24, 2026 at 12:53 pm

    All you need to do is to add a print statement before your logger call, eg:

    config.after_initialize do
      print Rails.logger.info("Testing")
    end
    

    The Rails console won’t automatically display anything while it’s initializing, but it will display anything you pass it with a print statement. Rails.logger returns the value it writes to the log, so it really is as simple as this.

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

Sidebar

Related Questions

I am a newbie at Javascript, JQuery, and to a lesser extent, Rails. I
I am working on a backbone.js application with rails api which provides the json
Does Xcode 4 have support for rails projects? If so, to what extent? UPDATE
The application is written in Ruby on Rails but the problem I am facing
I'm wondering to what extent I can use associations in Rails. Take into consideration
Using: Rails 3.0.3 Friendly_id: 4.0.0.beta11 I have create a fully working development version of
I have the following which worked in Rails 2.3.8: /lib/trimmer.rb I use it in
In my rails 3 model, I have two classes: Product, Service. I want both
I'm currently using Rails v2.3.5 at work and I'm quite new both to the
I am writing my first Rails gem, which adds a method to ActiveRecord. I

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.