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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T12:37:35+00:00 2026-06-08T12:37:35+00:00

I am working with log4net. I wants to add a button in my GUI

  • 0

I am working with log4net.
I wants to add a button in my GUI that when the user click on that button,
the log file will cleared.
How can I do that?

Thanks alot

  • 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-08T12:37:37+00:00Added an answer on June 8, 2026 at 12:37 pm

    It is not supported “out of the box” from log4net. However, you could using the RollingFileAppender and create a manual class/method to clean up/delete the log file.

    For reference, Log4Net: set Max backup files on RollingFileAppender with rolling Date

    Another approach to avoid the file being locked would be to set the minimal locking level on the log file via:

    <lockingModel type="log4net.Appender.FileAppender+MinimalLock" /> 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on a Log4Net configuration that will log all unhandled exceptions. I
I have a console project that I have been working on. I added log4net
Working with an undisclosed API, I found a function that can set the number
I am able to write to a log file using log4net and Cassini/IIS dev
I am using log4net for logging my asp.net application. However the log file is
I'm using Log4Net 2.0, I have it working as required but which to add
I'm using log4net to log in my app. My FileAppender is working fine, but
I'm trying to read a Log4net XMLLayout output log file using Log4View. <?xml version=1.0?>
I'm working with a WCF web service project and using log4net, but can't get
I'm working on configuring a RollingFileAppender in log4net programmatically. I have something like this

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.