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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T18:26:37+00:00 2026-05-27T18:26:37+00:00

i am using log4j and my configuration is as follows: log4j.rootLogger=OFF, stdout, rootLog log4j.appender.stdout=org.apache.log4j.ConsoleAppender

  • 0

i am using log4j
and my configuration is as follows:

log4j.rootLogger=OFF, stdout, rootLog
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout

# Pattern to output the caller's file name and line number.
log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n

log4j.appender.rootLog=org.apache.log4j.RollingFileAppender
log4j.appender.rootLog.File=${user.home}/logs/mylog.log
log4j.appender.rootLog.MaxFileSize=10000KB
log4j.appender.rootLog.MaxBackupIndex=3
log4j.appender.rootLog.layout=org.apache.log4j.PatternLayout
log4j.appender.rootLog.layout.ConversionPattern=%p %t %c - %m%n

# Control/Limit integrated frameworks logging messages

log4j.logger.org.hibernate=OFF
log4j.logger.org.springframework=OFF

although i am turning off the root logger and the hibernate logging

i am still seeing info in the console from:

2099 [main] INFO org.hibernate.cfg.SettingsFactory
2440 [main] INFO org.hibernate.tool.hbm2ddl.SchemaExport
3239 [main] WARN org.hibernate.util.JDBCExceptionReporter

how to stop that, please advise, thanks.

UPDATE: logging jars/dependencies:

       <dependency>
         <groupId>org.slf4j</groupId>
         <artifactId>slf4j-simple</artifactId>
         <version>1.5.8</version>
        </dependency>



        <dependency>

            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.15</version>
            <exclusions>
             <exclusion>
             <groupId>com.sun.jdmk</groupId>
             <artifactId>jmxtools</artifactId>
            </exclusion>
            <exclusion>
             <groupId>com.sun.jmx</groupId>
             <artifactId>jmxri</artifactId>
            </exclusion>
          </exclusions>

        </dependency>
  • 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-27T18:26:38+00:00Added an answer on May 27, 2026 at 6:26 pm

    That’s not really what your log4j config is. The output you’ve listed doesn’t match either of the conversion patterns you showed in the config file. It’s using some other configuration.

    Update: Based on your updated question, if you’re using an SLF4J Logger, then you aren’t even using Log4J because you’re using the slf4j-simple binding, which “outputs all events to System.err. Only messages of level INFO and higher are printed” per the SLF4J manual. To use Log4J, you have to use the slf4j-log4j12 binding.

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

Sidebar

Related Questions

I am trying to create 2 log files using log4j using this configuration: log4j.rootLogger=debug,stdout,logfile
Using the xml configuration of log4cxx (which is identical in configuration to log4j). I
I'm using Apache Commons Logging and SLF4J with log4j, but I also want to
You can use system properties in log4j configuration files using a ${variablename} syntax. Can
I have this log4j configuration in my grails config.groovy log4j = { error 'org.codehaus.groovy.grails.web.servlet',
I am using a third-party library which has a log4j.xml configuration - what's the
I can't configure org.hibernate.type (logging bind variables used in hibernate prepared statements) using log4j.xml,
I am trying to get log4j working using xml configuration. I have log4j.xml added
is there a standard configuration regarding logging with log4j in JUnit using Eclipse? When
I want to maintain two Log Files in my web-application using apache Log4j.jar: 1)

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.