Thanks to visit codestin.com
Credit goes to github.com

Skip to content

FileHandler Log File Size #176

@malikvivek

Description

@malikvivek

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.

Links to gists with output of the project:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions