Skip to content

Commit

Permalink
new: added one more example of follow mode usage
Browse files Browse the repository at this point in the history
  • Loading branch information
pamburus committed Feb 11, 2024
1 parent cd1bc84 commit acc3d64
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ High performance and convenient features are the main goals.
* Handles ~1 GiB/s for the first scan and allows fast filtering by timestamp range and level without scanning the data afterwards.
* Works fast with hundreds of local files containing hundreds of gigabytes of data.
* Reindexes large, growing files at lightning speed, skipping unmodified blocks, ~10 GiB/s.
* Follow mode with live message sorting by timestamp from different sources using the `-F` flag and preview of several recent messages with the `--tail` option.
* [Follow mode](#sorting-messages-chronologically-with-following-the-changes) with live message sorting by timestamp from different sources using the `-F` flag and preview of several recent messages with the `--tail` option.
* Custom complex [queries](#performing-complex-queries) that can include and/or conditions and much more.
* Non-JSON prefixes with `--allow-prefix` flag.
* Displays timestamps in UTC by default and supports easy timezone switching with the `-Z` option and the `-L` flag for a local timezone.
Expand Down Expand Up @@ -293,12 +293,23 @@ High performance and convenient features are the main goals.
Displays log messages from all log files in the current directory sorted in chronological order.
### Sorting messages chronologically with following the changes
- Command
```
$ hl -F <(kubectl logs -l app=my-app-1 -f) <(kubectl logs -l app=my-app-2 -f)
$ hl --sync-interval-ms 500 -F <(kubectl logs -l app=my-app-1 -f) <(kubectl logs -l app=my-app-2 -f)
```
Runs without a pager in follow mode by merging messages from the outputs of these 2 commands and sorting them chronologically within a default interval of 100ms.
Runs without a pager in follow mode by merging messages from the outputs of these 2 commands and sorting them chronologically within a custom interval of 500ms.
- Command
```
$ hl -F --tail 100 app1.log app2.log app3.log
```
Runs without a pager in follow mode by following the changes in three log files in the current directory and sorting them chronologically within a default interval of 100ms.
Preloads 100 lines from the tail of each file before filtering.
### Configuration files
Expand Down

0 comments on commit acc3d64

Please sign in to comment.