Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow chainsaw to read a directory containing more than one file #5

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Allow chainsaw to read a directory containing more than one file #5

wants to merge 7 commits into from

Conversation

tzachi-dar
Copy link
Contributor

On linux it is common to use logrotate to handle log files.

Logrotate trunks the files as they reach a certain size and also zips them.

Sometimes it is needed to open more than one file and show them on chainsaw.

An example to the content of such a directory is:

pump-loop-date.log

pump-loop-date.log.1

pump-loop-date.log.2.gz

pump-loop-date.log.3.gz

The goal is pass the directory name and the files pattern.

For example:

sftp://user:pass@192.168.1.20:20022/var/log/openaps/pump-loop-date.log*

and have chainsaw show all matching files by their order.

Signed-off-by: Tzachi Dar <tzachi.dar@gmail.com>
…e*).

Chainsaw will read all the files, from the latest to the newest and then will tail the last one.
Files can also be in the gzip format.

Signed-off-by: Tzachi Dar <tzachi.dar@gmail.com>
Signed-off-by: Tzachi Dar <tzachi.dar@gmail.com>
@jvz
Copy link
Member

jvz commented Feb 13, 2019

Thanks for the contribution. Can you file a jira ticket for this?

@tzachi-dar
Copy link
Contributor Author

Signed-off-by: Tzachi Dar <tzachi.dar@gmail.com>
Since log files might contain a lot of data that is not relevant, the maxLogingDays allows
one to limit the number of files that will be used.
For example if maxLogingDays=14 files that their last modified time is older than 14 days will
not be read.

Signed-off-by: Tzachi Dar <tzachi.dar@gmail.com>
…ad twice (second time was ignored, but consumed resources).

Signed-off-by: Tzachi Dar <tzachi.dar@gmail.com>
Signed-off-by: Tzachi Dar <tzachi.dar@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants