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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T05:05:43+00:00 2026-05-14T05:05:43+00:00

I am using the RollingFileAppender and the Size rollingStyle. By default it creates backup

  • 0

I am using the RollingFileAppender and the Size rollingStyle. By default it creates backup files with a numbered extension, this drives me nuts. Is it possible to change it so it always uses a defined extension (say .txt or .log) and inserts the number as part of the file name?

For example:

myapp.log
myapp.1.log
myapp.2.log
myapp.3.log

Here is my current configuration:

<appender name="RollingFileAppender" type="log4net.Appender.RollingFileAppender">
    <file value="myapp.log"/>
    <appendToFile value="true"/>
    <rollingStyle value="Size"/>
    <maximumFileSize value="1MB"/>
    <maxSizeRollBackups value="10"/>
    <staticLogFileName value="true"/>
    <layout type="log4net.Layout.PatternLayout">
        <conversionPattern value="%date{ISO8601} [%3thread] %-5level %logger{3}: %message%newline" />
    </layout>
</appender>
  • 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-14T05:05:43+00:00Added an answer on May 14, 2026 at 5:05 am

    The PreserveLogFileNameExtension property set to true should do the trick. Note: this property is not available in the currently released version 1.2.10 but is part of the current source. If you grab and build the source you’re good to go.

    Update: it is great to see log4net is moving forward. Version 1.2.11, and with it the PreserveLogFileNameExtension property, have been released.

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

Sidebar

Ask A Question

Stats

  • Questions 500k
  • Answers 501k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

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

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

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

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer by starting your application using python manage.py runserver 192.168.1.1:8000 replace… May 16, 2026 at 2:07 pm
  • Editorial Team
    Editorial Team added an answer In your document ready handler, you can examine the value… May 16, 2026 at 2:07 pm
  • Editorial Team
    Editorial Team added an answer You can use any Python persistance module, you aren't limited… May 16, 2026 at 2:07 pm

Trending Tags

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

Top Members

Related Questions

I'm working on configuring a RollingFileAppender in log4net programmatically. I have something like this
Using jQuery's UI Tabs. This is my code. <div id=tabs> <ul> <li><a href=#tabs-1>Find a
I am using log4net and I was to save the log file in the
I am using log4net and have completely setup it up with param name=File value=
We have this strange bug report from a customer: Log file last modification date
I didn't get a definitive answer to this question by Google'ing, so I pose
I am using log4j to do my logging. I lately added a library (Connection
Using SVN you can right click a folder TEST and add it to the
Using PHP, I'm trying to give each specific text its own variable. I believe
Using an access token with offline_access (which I believe is the ultimate and most

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.