Skip to content

Feature Request : Callback before log file deletion #195

Open
@akshaynotes

Description

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 !!

Activity

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

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions