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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T22:05:08+00:00 2026-06-08T22:05:08+00:00

By default all Logger output, visible when an application is running, is mute when

  • 0

By default all Logger output, visible when an application is running, is mute when the application is tested.

How to force the debugs, infos etc. to be shown in the specs2 reports?

  • 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-08T22:05:11+00:00Added an answer on June 8, 2026 at 10:05 pm

    First off, you may like some background why logging is disabled in test mode. This was Guillame Bort’s answer to a question in the play forum (see this thread):

    The logger is disabled in test mode for now because it was causing an
    huge PermGen space leak when running tests. But we are working to run
    tests in a forked JVM so we will enable it again soon.

    As a workaround, I created my own logger like this (Scala code):

    import play.api.{Play, LoggerLike, Logger}
    import org.slf4j.LoggerFactory
    import org.slf4j.impl.SimpleLoggerFactory
    
    object MyLogger extends LoggerLike {
    
      val factory = if (Play.isTest(Play.current)) {
        new SimpleLoggerFactory()
      } else {
        LoggerFactory.getILoggerFactory
      }
    
      val redirectDebugToInfo = factory.isInstanceOf[SimpleLoggerFactory]
    
      val logger = factory.getLogger("application")
    
      def apply(name: String): Logger = new Logger(factory.getLogger(name))
    
      def apply[T](clazz: Class[T]): Logger = new Logger(factory.getLogger(clazz.getCanonicalName))
    
      // this method is to make debug statements to show up in test mode
      override def debug(m: => String) = {
        if (redirectDebugToInfo) {
          info(m)
        } else {
          super.debug(m)
        }
      }
    }
    

    I don’t know how this code behaves regarding the PermGen leak in general, but so far I didn’t have that problem.
    To make it work you need to add this dependency:

    "org.slf4j" % "slf4j-simple" % "1.6.4"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

By default in all browsers, title attributes only show on mouse over. I want
I'd like to remove all default values that have been setup in a particular
I am trying to block all default methods except create and update in my
when started, jetty per default loads all directories and war-files in its webapps directory,
When Instantiating a class, Windsor by default treats all public properties of the class
I need to place default text to all rows for particular column in jquery
The C++ specification says the default destructor deletes all non-static members. Nevertheless, I can't
I want to have site wide default settings for all jQuery validation uses on
Is there a place when I can put default imports for all my modules?
I'm being a little lazy here but are these (below) all the default Backbone

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.