google / mtail

extract internal monitoring data from application logs for collection in a timeseries database
Apache License 2.0
3.82k stars 378 forks source link

feat: Handle `stdin` closure and shut down the tailer. #868

Closed jaqx0r closed 3 months ago

jaqx0r commented 3 months ago

With this change the tailer does a better job of tracking current and future work, shutting down when all streams are completed. If there are no filesystem patterns to watch and all streams close, (e.g. stdin closes) then mtail will also stop.

This fixes a longstanding issue where mtail would remain running if stdin was the only log, and was closed.

Fixes: #331

github-actions[bot] commented 3 months ago

Unit Test Results

    1 files     27 suites   8m 50s :stopwatch:   648 tests   646 :white_check_mark: 2 :zzz: 0 :x: 1 917 runs  1 911 :white_check_mark: 6 :zzz: 0 :x:

Results for commit e99f7e58.

:recycle: This comment has been updated with latest results.