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

  • Home
  • SEARCH
  • 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 8609075
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T03:47:08+00:00 2026-06-12T03:47:08+00:00

I am learning log4j. But, I get this error not sure if I’m missing

  • 0

I am learning log4j. But, I get this error not sure if I’m missing something. I have all the jars in place.

public class LoggingDemo {
    private static final Logger logger = LoggerFactory.getLogger(LoggingDemo.class);

    public static void main(String[] args) {
        logger.info("Starting App....");
        System.out.println("Testing log4j.......");
        logger.info("Terminating App!");
    }

}

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-06-12T03:47:10+00:00Added an answer on June 12, 2026 at 3:47 am

    I get this all the time when I am creating a new project. You need to create a log4j.properties file and add it to your class path. See the Configuration section of the manual http://logging.apache.org/log4j/1.2/manual.html

    Or just change your code to:

    public class LoggingDemo {
        private static final Logger logger = LoggerFactory.getLogger(LoggingDemo.class);
    
        public static void main(String[] args) {
            BasicConfigurator.configure();
            logger.info("Starting App....");
            System.out.println("Testing log4j.......");
            logger.info("Terminating App!");
        }
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have started learning something about log4j as so far its working fine here
Learning C at University. This is not a homework, but I was trying to
Just learning the world of jquery, and all my googling gives examples like this:
learning Jquery and integrating with PHP - getting there, but have one last challenge
Learning rails and something smells a little funny. I have the following form for
Learning Ruby. Needed to create a hash of arrays. This works... but I don't
Learning some VBA. So far, I've constructed this piece of code which should allow
Learning xml, Can anyone help me? I have following XML code: **<book lang=en>name of
Learning about notifyAll made me question something about notify: in a typical situation we
Learning C and this is an exercise. The user is asked to input the

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.