Skip to content

How to deal with the log name with a suffix, such as access.log.20221221314, using access.log.* will load all the logs, I only want to monitor the logs of the current hour #885

Answered by jaqx0r
huozhirui asked this question in Q&A
Discussion options

You must be logged in to vote

Well the normal practice is to use log rotation to create the date-named log files so that there's a common base name to follow.

After a timeout of one hour, all the logs that haven't been written to get removed from the list of watched logs: https://google.github.io/mtail/Deploying.html#setting-garbage-collection-intervals

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by jaqx0r
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #694 on June 24, 2024 12:06.