Skip to content
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

Ability to rotate log files with main file not changing name #118

Closed
numito opened this issue Oct 28, 2019 · 1 comment
Closed

Ability to rotate log files with main file not changing name #118

numito opened this issue Oct 28, 2019 · 1 comment

Comments

@numito
Copy link

numito commented Oct 28, 2019

Hello,

Serilog file sink allows to rotate log file. On each rotation a new file will be created and the log will be written in this file. Therefor the file name changes on each rotation. Some active firewall software such as fail2ban won't work if the file name keeps on changing, as it wouldn't know which will be the next file name.
Therefor I have modified serilog sink file to add a configuration parameter so it always write to the same filename. On each file rotation the current file is copied to a new name, and the current file is emptied.

I would like to contribute my changes, are you interested ?

Best regards,
Numa

@cocowalla
Copy link
Contributor

Hi, the behaviour you are referring to is already discussed by #40, so it would be better if any discussion could continue over there - thanks!

If I can summarise for you here though:

  • A lot of people are interested in this functionality
  • It may be tricky to get right
  • Rather than replacing existing functionality, we should come up with a system than enabled pluggable naming/rolling policies

If you could come up with an API proposal for that last point, it would be really helpful to moving this forward 😄

Would also be helpful if you could push your fork so others could see it.

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

No branches or pull requests

2 participants