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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T16:14:36+00:00 2026-05-27T16:14:36+00:00

I would like to configure my log4j file for a production environment with struts2.

  • 0

I would like to configure my log4j file for a production environment with struts2. I have the below configuration…

log4j.logger.com.opensymphony.xwork2=ERROR
log4j.logger.ognl=ERROR
log4j.logger.org.apache=WARN
log4j.logger.org.apache.struts2=ERROR
log4j.logger.org.apache.struts2.util.StrutsTypeConverter=ERROR
log4j.logger.freemarker=ERROR

#apache torque which is my ORM needs to be add debug.. so I can see SQLs being
#printed
log4j.logger.org.apache.torque=DEBUG

#this is my source package base which need be at debug
log4j.logger.com.aesthete=DEBUG

The above configuration is fine, except that any errors in struts2 is not being printed out to the log at all. Would be grateful for some help in the correct configuration that most users in a production environment running struts2.

  • 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-27T16:14:37+00:00Added an answer on May 27, 2026 at 4:14 pm

    ERROR is really restrictive; I couldn’t recommend that for production. WARN is the absolute least I’d have in production–you could miss a lot of very important information, particularly at startup.

    IMO, INFO is more-typical, and most useful.

    DEBUG should rarely be used in a production environment; if you’re relying on it I’d suggest that your logging was put in the code at the wrong level. DEBUG is for just that–debugging.

    I’ve never restricted S2 to anything greater than WARN, but I tend to leave things at INFO level unless specifically trying to debug an issue. On production I also use a fast layout, again unless there’s a particularly component that’s being worked on.

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

Sidebar

Related Questions

I would like to configure logger for certain class to write to separate file.
I would like to configure my environment to serve css and javascript files from
I have written an SWT Java application and would like to configure it to
I have two specific fonts installed on my computer and would like to configure
I have two appenders, file and console, in my project. I would like to
I have following XML configration i would like to convert to java property file.
I would like to configure logging in my application with log4j.properties and instruct (somehow)
I would like to configure JBoss 4.2.x to utilize the JBoss Web Native Connectors
I am using Unity for IOC. I would like to configure the creation of
HttpServletRequest.getRemoteAddr() in Tomcat returns IPv6 formatted IP address, but I would like to configure

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.