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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T17:58:57+00:00 2026-06-16T17:58:57+00:00

I am using org.apache.log4j.RollingFileAppender and facing strange issue. When I set log file name

  • 0

I am using org.apache.log4j.RollingFileAppender and facing strange issue.
When I set log file name to process.log it does not roll over but when I set log file name to process1.log or process2.log it works fine and rolls over after given max file size.

log4j.appender.ProcessLogAppender=org.apache.log4j.RollingFileAppender
log4j.appender.ProcessLogAppender.File=D:/logs/process.log

log4j.appender.ProcessLogAppender.Append=true
log4j.appender.ProcessLogAppender.MaxFileSize=30KB
log4j.appender.ProcessLogAppender.MaxBackupIndex=5
log4j.appender.ProcessLogAppender.layout=org.apache.log4j.PatternLayout
log4j.appender.ProcessLogAppender.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p - %m%n

log4j.logger.com.util.ApplicationLogger=ALL,ProcessLogAppender 
  • 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-16T17:58:58+00:00Added an answer on June 16, 2026 at 5:58 pm

    Create java logging class like this properly and read your property file through it. Restart server. These will solve this problem.

    These lines are very important.

    private static Properties loggerProperties = LoggerClassName.read(“log4j.properties”);
    
    static Logger validation =
    Logger.getLogger(LoggerClassName.class);
    
    static {
      PropertyConfigurator.configure(loggerProperties);
      validation.setLevel(Level.DEBUG);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My log4jproperties: log4j.appender.file=org.apache.log4j.RollingFileAppender log4j.appender.file.maxFileSize=100KB log4j.appender.file.maxBackupIndex=5 log4j.appender.file.File=checkLog.log log4j.appender.file.threshold=DEBUG log4j.appender.file.layout=org.apache.log4j.PatternLayout log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n log4j.appender.console=org.apache.log4j.ConsoleAppender
I am using this property file to setup log4j in Spring: log4j.appender.EMAIL=org.apache.log4j.net.SMTPAppender log4j.appender.EMAIL.filter=org.apache.log4j.varia.LevelRangeFilter log4j.appender.EMAIL.filter.levelMin=FATAL
I'm using xerces(http://xerces.apache.org) lib to parse a XML file in C++, so I downloaded
I'm using org.apache.http.client libraries and this has some default logging. I've also got log4j
Using org.apache.log4j.jdbc.JDBCAppender , how can I get stracktraces logged with warn and error into
I've created a appender of the type NTEventLogAppender like this: log4j.appender.EVA=org.apache.log4j.nt.NTEventLogAppender #log4j.appender.EVA.log=TestLog log4j.appender.EVA.layout=org.apache.log4j.PatternLayout log4j.appender.EVA.source=TestSource
i am using log4j and my configuration is as follows: log4j.rootLogger=OFF, stdout, rootLog log4j.appender.stdout=org.apache.log4j.ConsoleAppender
I am using org.apache.log4j.Logger for logging and I am developing a jsp just for
I know its a package difference 1) org.apache.log4j.Logger logger = Logger.getLogger(clazz); 2) org.apache.commons.logging.Log log
I want to maintain two Log Files in my web-application using apache Log4j.jar: 1)

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.