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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T07:45:33+00:00 2026-05-23T07:45:33+00:00

Project1 is using classes from project2 and project3. Project 2 and project 3 has

  • 0

Project1 is using classes from project2 and project3.

Project 2 and project 3 has seperate log4j.properties file and logging classes (Pro2.java & Pro3.java with info,debug methods) in their src folder.

Project1 has a main method that calls

    Pro2.logInfo("This is a log for project2");
    Pro3.logInfo("This is a log for project3");

I want these logs to be logged in two seperate log files as I set in their log4j.properties file.

  • 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-23T07:45:33+00:00Added an answer on May 23, 2026 at 7:45 am

    Log4j will automatically look for and use config files it finds on the classpath. It looks for files called log4j.properties and log4j.properties and possibly others.

    Alternatively you can programatically load config using;

    String filename = "/path/to/config/Project1log4j.properties";
    PropertyConfigurator.configure(filename);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using XmlSerializer with classes created from a xsd using xsd.exe . It has
I'm using LINQ to SQL classes in a project where the database design is
How can I list all the classes in my current project(assembly?) using reflection? thanks.
I am building a project using Visual Studio. The project has a dependency on
In my current project I'm using classes which implement the following ITransaction interface shown
Right now, my project has two classes and a main. Since the two classes
OK, so I have two (completely unrelated, different project) classes using iterators now. One
I have a project where I'm implementing Dijkstra's shortest path algorithm using C++ classes.
We're working on a Flash CS4 project where the main .fla file has ballooned
I'm working on a project in RAD Studio 2007, using VCL classes in c++.

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.