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

Feature Request : Callback before log file deletion #195

Open
akshaynotes opened this issue Nov 6, 2023 · 0 comments
Open

Feature Request : Callback before log file deletion #195

akshaynotes opened this issue Nov 6, 2023 · 0 comments

Comments

@akshaynotes
Copy link

Problem :

So, my lumberjack logger has rotation based on size (10 MB) and MaxBackups I am using is 32. I am uploading these log files every hour to my server and I delete the log files which are already uploaded. The problem I am facing is if before triggering my cron job the file count exceeds 32 lumberjack will start deleting the files and I am losing those files (cant upload to the server as lumberjack has deleted them).

Feature Request :

I want a callback function which I can pass while initializing logger, which will get triggered just before deleting the logger file
callback(string filename){
//1. check if this file was uploaded
//2. if not upload
//3. if yes -> continue
}

Thanks !!

@akshaynotes akshaynotes changed the title Feature Request : Callback on log file deletion Feature Request : Callback before log file deletion Nov 6, 2023
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

1 participant