Skip to content

Allow option to keep root log file as most recent #115

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
etreff-tillster opened this issue Sep 19, 2019 · 1 comment
Closed

Allow option to keep root log file as most recent #115

etreff-tillster opened this issue Sep 19, 2019 · 1 comment

Comments

@etreff-tillster
Copy link

Assuming the following:

  1. I want to use file rolling based on size
  2. I am saving to path ".\MyLog.log"
  3. My file limit is 10mb
  4. My file retention limit is 5 files

Once MyLog.log is full a new file, MyLog_001.log (or whatever), will be created and writing will continue in this new file. I would like the option to have MyLog.log copied to MyLog_001.log and writing continue in a now cleared out MyLog.log file.

This is the same behavior that Log4Net has with their rolling files. Each time the primary file rolls over, instead of writing to a new file, all previous files are copied and their filenames are incremented by 1. The primary file is then cleared and writing resumes in that same file. Assuming retention limit of 5 files, this means that MyLog_005.log contains the oldest data, not the newest data.

This type of behavior is beneficial for our QA team as they can keep a single file open in their editor and know that it will always contain the most recent log info.

@cocowalla
Copy link
Contributor

Hi, I think the behaviour you are asking for is covered by #40, so discussion can continue over there if you want to - thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants