Skip to content
This repository was archived by the owner on Aug 1, 2021. It is now read-only.
This repository was archived by the owner on Aug 1, 2021. It is now read-only.

RollingFileAppender does not correctly append on device restart #7

Open
@CrazyRangerBob

Description

@CrazyRangerBob

When using RollingFileAppender the log file will restart from the second logging line when the device is restarted, rather than correctly appending and rolling.

Solution appears to be to switch lines 116 and 117 in RollingFIleAppender.cpp getFile() to

_maxRowLength = readMaxRowLength();
_file.seek(readOffset(), SeekSet);

Otherwise the FS position pointer is left in an incorrect position by the "readMaxRowLength()" operation.

Metadata

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