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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T01:35:56+00:00 2026-05-26T01:35:56+00:00

I am trying to learn about log4j so I just tried to do something

  • 0

I am trying to learn about log4j so I just tried to do something which is very simple;

Logger logger = Logger.getLogger("ClientApplicationLog");
logger.info("Logger Test");

But after making this I got;

log4j:WARN No appenders could be found for logger (ClientApplicationLog).
log4j:WARN Please initialize the log4j system properly.

Do you know where I am wrong ?

Thank you all

  • 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-26T01:35:57+00:00Added an answer on May 26, 2026 at 1:35 am

    You’re missing the log4j.properties or log4j.xml in your classpath.

    You can bypass this by using

    BasicConfigurator.configure();
    

    But beware this will ONLY log to System.out and is not recommended. You should really use one of the files above and write to a log file.

    A very simple example of log4j.properties would be

    #Log to Console as STDOUT
    log4j.appender.stdout=org.apache.log4j.ConsoleAppender
    log4j.appender.stdout.Target=System.out
    log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
    log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c %3x - %m%n
    #Log to file FILE
    log4j.appender.file=org.apache.log4j.DailyRollingFileAppender
    log4j.appender.file.File=logfile.log
    log4j.appender.file.DatePattern='.'yyyy-MM-dd
    log4j.appender.file.append=true
    log4j.appender.file.layout=org.apache.log4j.PatternLayout
    log4j.appender.file.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c %3x - %m%n
    
    #Root Logger
    log4j.rootLogger=INFO, stdout, file
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to learn about stack base overflow and write a simple code to
I am trying to learn about simple shape detection for a project I'm working
For the past few weeks, I've been trying to learn about just how email
I was trying to learn about different states of objects in Hibernate. I tried
Alright, I'm just trying to learn about using Contact information, but I'm a bit
Trying to learn about php's arrays today. I have a set of arrays like
I'm trying to learn about catamorphisms and I've read the Wikipedia article and the
I'm trying to learn about trees by implementing one from scratch. In this case
I'm trying to learn about Expression trees, and I've created a method that takes
I've been trying to learn about metaclasses in Python. I get the main idea,

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.