-
Notifications
You must be signed in to change notification settings - Fork 578
Closed
Description
FileHandler sets log file size to 0 every-time application restarts or is deployed, even if the log file exists.
Expected behavior
If the log file exists from previous execution, FileHandler should pick the size of the log file, whatever it is; else set it to 0.
Actual behavior
If the application log is set to roll over at 1 MB, and the application is restarted when the log file reaches around 800 KB. At this moment, the log file size is set to 0 bytes and, it will now, not rollover until it reaches 1.8 MB, 1 MB being the rollover size limit. This makes log file size keep growing and prevents roll over.
Steps to reproduce the behavior
I've created a simple application that reproduces the bug. Please clone it and and execute the the shell file.
- Clone the bug reproduction project from https://github.com/malikvivek/FileHandlerTest
cd path/to/clonedRepochmod 777 FileHandler.sh./FileHandler.sh
Links to gists with output of the project:
- This gist shows the presence of the bug: https://gist.github.com/malikvivek/219fe60f0998285d63b0b3fb9b48bc9a
- This gist shows the bug has been patched
https://gist.github.com/malikvivek/b137fbed85fe0c78ee1571781dc89cb9
Metadata
Metadata
Assignees
Labels
No labels