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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T12:26:47+00:00 2026-05-29T12:26:47+00:00

This is my log4j configuration file, whenever I run the batch file to execute

  • 0

This is my log4j configuration file, whenever I run the batch file to execute the test case, a number of nulls are printed on the console. I have no experience with log4j, but I guess I have not assigned testAppender to ConsoleAppender, then why it is printing on console.

log4j.logger.com.rbs.rmd_test_suite.util.TestSuiteLogger=DEBUG, testAppender

log4j.appender.testAppender=org.apache.log4j.RollingFileAppender
log4j.appender.testAppender.File= ../log/rmd_test_suite_info.log
log4j.appender.testAppender.layout=org.apache.log4j.PatternLayout
log4j.appender.testAppender.layout.ConversionPattern=%m%n
log4j.appender.testAppender.append=true

#Prevent internal log4j DEBUG messages from polluting the output.
log4j.logger.org.apache.log4j.PropertyConfigurator=INFO
log4j.logger.org.apache.log4j.config.PropertySetter=INFO
log4j.logger.org.apache.log4j.FileAppender=INFO 

#Disabling logging of external jars 
log4j.rootLogger=Off
log4j.logger.org.openqa = OFF

I am using Selenium Web Driver API to automate test cases for an application. Any help is appreciated.

Logging in the file is perfectly fine. Problem is the nulls that are being printed on console.enter image description here

  • 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-29T12:26:49+00:00Added an answer on May 29, 2026 at 12:26 pm

    One possible reason I can think of is, your log4j.properties file is not in the bin folder of your app.

    Edited : Got it your rootLogger is OFF

    log4j.rootLogger=Off
    

    Instead use

    log4j.rootLogger=ALL
    log4j.logger.org.openqa=ALL
    log4j.rootLogger=ALL, CA
    log4j.appender.CA=org.apache.log4j.ConsoleAppender
    log4j.appender.CA.layout=org.apache.log4j.PatternLayout
    log4j.appender.CA.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this log4j configuration in my grails config.groovy log4j = { error 'org.codehaus.groovy.grails.web.servlet',
If I make a change to a Log4j configuration file, do I have to
I have a file (more specifically, a log4j configuration file) and I want to
My procedure for using log4j is this: put a .properties file somewhere in a
So we have our J2EE application using Log4j like this public class CustomerController {
Is it possible to have microsecond level timestamps in log4j logging? This is on
Packaging a log4j configuration file in a NetBeans Platform application apparently requires some thinking
I have an xml configuration file which works fine in Java, and I'm trying
This is a standalone java application. I am using the configuration file below and
I have an application for which log4j logging is configured in a log4j.properties file.

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.