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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T20:38:44+00:00 2026-05-25T20:38:44+00:00

I am trying to use log4j logging framework in a java desktop application. When

  • 0

I am trying to use log4j logging framework in a java desktop application.

When I run the code I am getting a message

log4j: log4j:WARN No appenders could be found for logger 

I googled for the above error and found that it occurs when the log4j.properties file is not found by the app.

I am creating the desktop app using Eclipse. Currently log4j.properties is within the same folder that contains the source (in ‘src’ folder). Where should I put this file to make it work properly?

  • 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-25T20:38:45+00:00Added an answer on May 25, 2026 at 8:38 pm

    log4j will use a Default Initialization Procedure to find your configuration file. The documentation notes:

    The preferred way to specify the default initialization file is through the log4j.configuration system property

    If this property is not set – log4j will look at the classpath. In your case you have to place the file in the src directory (assumed that the content will be put in the classes path while you build the system). If you use maven place the file to the src/main/resources directory.

    As you placed your file to the src directory check, that the file get transferred to the top level directory of your compiled classes.

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

Sidebar

Related Questions

I am trying to use log4j for my Java desktop application that i am
I am trying to use commons-logging with log4j to write my app logs to
I'm trying to configure log4j to use the SMTPAppender but I keep getting relay
I'm trying to use log4j my log4j.propreties: log4j.rootLogger=DEBUG, out log4j.logger.org.springframework=INFO log4j.logger.org.apache.activemq=INFO log4j.logger.org.apache.activemq.spring=WARN log4j.logger.org.apache.servicemix=DEBUG, stdout
I am trying to use Log4j as part of the Spring Framework, as far
I was trying use a set of filter functions to run the appropriate routine,
I am trying use a Java Uploader in a ROR app (for its ease
Trying to use an excpetion class which could provide location reference for XML parsing,
Trying to use this code to connect the AD PrincipalContext context = new PrincipalContext(ContextType.Domain,
I am trying to produce a proof of concept shipping logging from Log4J through

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.