Skip to content

Conversation

@kaiiorg
Copy link

@kaiiorg kaiiorg commented Nov 20, 2023

Looking to use lumberjack for a personal project and the feature request in #195 would be a nice-to-have, so I implemented it myself.

I did this by adding a function pointer to the Logger struct and calling it just before deleting the file (after checking if it is nil, of course). I copy/pasted the TestCleanupExistingBackups test to TestCleanupExistingBackups_CallsCallback (so I know we're testing it with a known good test) and just increment a counter and validate that counter is the number we expect.

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

Successfully merging this pull request may close these issues.

1 participant