Skip to content

Commit

Permalink
docs: add docs for -n flag on logs (#1370)
Browse files Browse the repository at this point in the history
## Description:

## Is this change user facing?
YES
  • Loading branch information
tedim52 committed Sep 25, 2023
1 parent 73f8d1d commit 3fe50d2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/docs/cli-reference/service-logs.md
Expand Up @@ -13,10 +13,12 @@ kurtosis service logs $THE_ENCLAVE_IDENTIFIER $THE_SERVICE_IDENTIFIER
where `$THE_ENCLAVE_IDENTIFIER` and the `$THE_SERVICE_IDENTIFIER` are [resource identifiers](../concepts-reference/resource-identifier.md) for the enclave and service, respectively. The service identifier (name or UUID) is printed upon inspecting an enclave.

:::note Number of log lines
By default, logs printed in the terminal from this command are truncated at 200 lines. For a stream of logs, we recommend the `-f` flag. For a snapshot of the logs at a given point in time (e.g. after a change), we recommend the [`kurtosis dump`](./dump.md).
By default, logs printed in the terminal from this command are truncated at the most recent 200 log lines. For a stream of logs, we recommend the `-f` flag. For all the logs use the `-a` flag and for a snapshot of the logs at a given point in time (e.g. after a change), we recommend the [`kurtosis dump`](./dump.md).
:::

The following optional arguments can be used:
1. `-a`, `--all` can be used to retrieve all logs.
1. `-n`, `--num=uint32` can be used to retrieve X last log lines. (eg. `-n 10` will retrieve last 10 log lines, similar to `tail -n 10`)
1. `-f`, `-follow` can be added to continue following the logs, similar to `tail -f`.
1. `--match=text` can be used for filtering the log lines containing the text.
1. `--regex-match="regex"` can be used for filtering the log lines containing the regex. This filter will also work for text but will have degraded performance.
Expand Down

0 comments on commit 3fe50d2

Please sign in to comment.