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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T18:04:37+00:00 2026-06-04T18:04:37+00:00

During deployment of a web application (in test environment) on customer site we encountered

  • 0

During deployment of a web application (in test environment) on customer site we encountered a problem with logging of the application. I’ll shortly try to describe the current situation:

  • Implementation uses Logger retrieved by java.util.logging and
    apache.commons.logging.
  • In the deployed packages exists a commons-logging.properties pointing to JUL.
  • Application is running on Tomcat 6.x

The customer decided that he wants to use Log4J on tomcat and configured it so it works (generally) – of course it’s not working for the mentioned application.

As it seems that we need to change logging implementation anyway – i wanted to ask you for some best practices on how to implement logging in a web application.
Following things should be possible:

  • Customer needs to be able to change log-level without modifying anything in the *.war-file. -> If he would have to modify the war-file he would have to do this for every new build …
  • It should be possible to have some kind of rolling-file-logging (e.g.: max 10 files with max. 10mb each) – of course it should also be up to the customer to define and change this setting …
  • As another customer might want to use standard JUL-logging instead – I’d of course prefer to not hard-code the preferred library (Log4J in this case).
  • 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-04T18:04:39+00:00Added an answer on June 4, 2026 at 6:04 pm

    Customer needs to be able to change log-level without modifying anything in the *.war-file.

    You can put logging framework configuration file (log4j.xml or logback.xml) outside of the WAR file. Also logback supports automatic reconfiguration when this file is changed.

    It should be possible to have some kind of rolling-file-logging

    Both log4j and Logback support rolling back of files, both based on size and date, see e.g. RollingFileAppender.

    As another customer might want to use standard JUL-logging instead – I’d of course prefer to not hard-code the preferred library (Log4J in this case).

    apache-commons-logging is fundamentally broken, use slf4j instead. Then you simply put different implementations on your CLASSPTH. Also the SLF4J API is quite pleasent.

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

Sidebar

Related Questions

I have written an ASP.NET web application (not site) in Delphi Prism. Everything works
During deployment of my application in Oracle weblogic 11g Messages Unable to access the
During a web deployment I'd like to change some ACL settings. I found this
During the package phase of a VSeWSS deployment, an exception is thrown. From the
During the work on my iPhone application the icon changed from time to time.
During my work on this database application, I've apparently managed to corrupt a form
Start a new web application using NetBeans 7 on GlassFish 3.1 In index.xhtml body
I've got a strange exception with my EJB3.1 application, a ZipException is thrown during
My application is a dotnet 4 hybrid - MVC in some areas, web forms
I currently have a C# Web Application Project with a multitude of pages as

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.