Skip to content

Add flush delay #2

@Arkoniak

Description

@Arkoniak

Well, idea is quite simple:

flush option instead of true/false should have three values:

  • instant
  • auto
  • no

instant and no should work in the same way, as true/false is currently working. auto on the other hand should save the time of last flush and if the time of the logging event exceeds some threshold (for example 1 second) then a new flush is made and last flush time is renewed.

It may have a drawback that if you have a burst of logging events and then a long pause, few of the last events wouldn't show up until new log event or when stream is closed, but I think it's fine.

Threshold time should be set with the help of flush_auto_threshold argument.

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