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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T21:14:57+00:00 2026-06-06T21:14:57+00:00

As long as I require gems by Bundler.require , my logger doesn’t work well

  • 0

As long as I require gems by Bundler.require, my logger doesn’t work well any more.

require "logger"
logger1 = Logger.new(STDERR)

require 'bundler/setup'
Bundler.require
logger2 = Logger.new(STDERR)

logger1.info 123
logger2.info 123

Output:

I, [2012-06-29T17:51:30.323356 #20774]  INFO -- : 123
123

I even don’t have logger in my Gemfile.

source 'http://rubygems.org'

gem "activesupport", "~> 3.2.6", :require => ["active_support", "active_support/core_ext"]

EDIT:
seems the problem is from ActiveSupport. Could I have it and Logger both? Any suggestion?

  • 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-06-06T21:14:58+00:00Added an answer on June 6, 2026 at 9:14 pm

    active_support/core_ext changes the default logger format to Logger::SimpleFormatter.

    To get the old formatter back you just need to manually assign it after initialization:

    logger2 = Logger.new(STDERR)
    logger2.formatter = Logger::Formatter.new
    
    logger2.info 123
    => I, [2012-06-29T13:56:07.580428 #24714]  INFO -- : 123
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

(Long time reader of SO, first time asking a q. I'm quite new to
I work in a place that has gazillions of tools which require tons of
I recently started getting this error while running gems or bundler. The only thing
I had this problem Cucumber scenarios for extremely long work flow And now I've
long b = GC.GetTotalMemory(true); SortedDictionary<int, int> sd = new SortedDictionary<int, int>(); for (int i
I have some long processes that require notifications to the user at successive stages,
We have many long-running processes that each require dozens of steps. Each step is
Sorry for this long post. The question is however small but requires full detail.
Long time ago I made a socket based server application using the principle of
Long methods are evil on several grounds: They're hard to understand They're hard to

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.