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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T15:41:38+00:00 2026-05-11T15:41:38+00:00

I have a peculiar problem with Log4j. We are deploying on Weblogic 10 using

  • 0

I have a peculiar problem with Log4j. We are deploying on Weblogic 10 using log4j.xml. That works fine. We figured a way to run Tomcat 6 in such a way that we can develop on this platform and deploy on Weblogic 10.

I have figured out how to make log4j.properies work with Tomcat 6 with additional JArs that use the JULI logging mechanism in Tomcat 6. Unfortunately, my log4j.xml (that works with Weblogic) fails to work with Tomcat 6. So I am forced to use log4j.properties.

I have not been able to figure out how to indicate application class hierarchies in log4j.properties. So my question is how does on convert the following log4j.xml entries to log4j.properties

<?xml version='1.0' encoding='UTF-8' ?> <!DOCTYPE log4j:configuration SYSTEM 'log4j.dtd'>  <log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/'>  <appender name='vccashib' class='org.apache.log4j.DailyRollingFileAppender'>     <param name='DatePattern' value=''.'yyyy-MM-dd'/>     <param name='File' value='vccashib_10.log'/>     <layout class='org.apache.log4j.PatternLayout'>         <param name='ConversionPattern' value='%d{ISO8601} %t %-5p %c - %m%n'/>     </layout>   </appender>    <logger name='org.hibernate'>     <level value='DEBUG'/>     <appender-ref ref='vccashib' />   </logger>  </log4j:configuration> 

So let us say I was to write a logger that captures logs for classes in my com.abc.xyz hierarchy. How do I indicate that in log4j.properties? (I have taken care of a other values, such as type of appenders, DatePattern, ConversionPattern, FileName, layout etc.)

Please note, I have sent you the only problem-specific code.

Alternatively, if you know the answer on how to make log4j.xml that is part of my war archive with Tomcat 6 (JULI jars are in place and work well with log4j.properties), please let me know

Please help.

Suhaas

  • 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. 2026-05-11T15:41:38+00:00Added an answer on May 11, 2026 at 3:41 pm

    I’m not entirely clear on your question. I’ve deployed log4j on tomcat 6 with no problems (can you post the specific problems you’re having with your xml config?). I’m not sure what you mean by ‘I have figured out how to make log4j.properies work with Tomcat 6 with additional jars that use the JULI logging mechanism in Tomcat 6′).

    • is the config in the proper location?
    • are some of your jars being loaded from the global tomcat ($TOMCAT_HOME/lib) directory? If so the library might be looking for the config from the global directory, rather than from your webapp.

    If you’re just talking about how to manage separate class hierarchies in your log4j config, it’s something like :

    log4j.rootCategory=INFO,stdout  #e.g. not interested in most stripes or spring warnings log4j.logger.net.sourceforge.stripes=ERROR log4j.logger.org.springframework=ERROR  log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.layout=org.apache.log4j.PatternLayout log4j.appender.stdout.layout.ConversionPattern=%-d %-5p [%t] %c{1} %3x -  %m%n  #This creates the separate log 'Foo' at DEBUG level. Everythign within  #the 'com.foo' package will # get logged here log4j.category.com.foo=DEBUG,Foo log4j.appender.Foo=org.apache.log4j.RollingFileAppender log4j.appender.Foo.layout=org.apache.log4j.PatternLayout log4j.appender.Foo.layout.ConversionPattern=%-d %-5p [%t] %c{1} %3x - %m%n log4j.appender.DetailLogFile.File=foo.log #this is the important line - if this isn't here the stuff in #com.foo package will show up in both logs. log4j.additivity.com.foo=false 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 85k
  • Answers 85k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer if it's a plain-old array, I would just do this:… May 11, 2026 at 5:06 pm
  • Editorial Team
    Editorial Team added an answer Unfortunately features in general are not retroactive. You cannot update… May 11, 2026 at 5:06 pm
  • Editorial Team
    Editorial Team added an answer You might consider replacing the logic in the constructor with… May 11, 2026 at 5:06 pm

Related Questions

Ok, so here is a problem analogous to my problem (I'll elaborate on the
I'm getting a peculiar javascript error with IE. I have an updatepanel, and inside
I'm working on a project at the moment where I've come up against a
I've got a java server (not web based, more like a big, many-threaded standalone
I have a little demonstration below of a peculiar problem. using System; using System.Windows.Forms;

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.