From 06067317a17de41ce6fdd95b0d00e64529238cba Mon Sep 17 00:00:00 2001 From: "aspire-repo-bot[bot]" <268009190+aspire-repo-bot[bot]@users.noreply.github.com> Date: Thu, 14 May 2026 02:41:19 +0000 Subject: [PATCH 1/4] docs: add --search option to aspire logs command reference Documents the --search / -s option added in microsoft/aspire#17010, including server-side filtering behavior when connected to a v2+ AppHost auxiliary backchannel. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../reference/cli/commands/aspire-logs.mdx | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/frontend/src/content/docs/reference/cli/commands/aspire-logs.mdx b/src/frontend/src/content/docs/reference/cli/commands/aspire-logs.mdx index b52c48714..8340c9dc5 100644 --- a/src/frontend/src/content/docs/reference/cli/commands/aspire-logs.mdx +++ b/src/frontend/src/content/docs/reference/cli/commands/aspire-logs.mdx @@ -18,7 +18,7 @@ aspire logs [] [options] ## Description -The `aspire logs` command displays console logs from resources in a running AppHost. You can view logs for all resources, filter to a specific resource, follow new log entries in real time, and choose table or JSON output for automation. Hidden resources are excluded by default; use the `--include-hidden` option to show their logs. +The `aspire logs` command displays console logs from resources in a running AppHost. You can view logs for all resources, filter to a specific resource, follow new log entries in real time, search log content with full-text filtering, and choose table or JSON output for automation. Hidden resources are excluded by default; use the `--include-hidden` option to show their logs. When executed without the `--apphost` option, the command: @@ -55,6 +55,10 @@ The following options are available: Number of lines to show from the end of the logs. +- **`-s, --search `** + + Full-text search to filter log content. Only log lines whose message or resource name contains the specified text are shown. When connected to an AppHost that supports the v2 or later auxiliary backchannel, filtering is applied server-side before log lines are transferred, which significantly reduces overhead for large log streams. + - **`-t, --timestamps`** Show timestamps for each log line. @@ -111,6 +115,18 @@ The following options are available: aspire logs --include-hidden ``` +- Filter logs by search text: + + ```bash title="Aspire CLI" + aspire logs --search "error" + ``` + +- Search logs for a specific resource and show only the last 75 matching lines: + + ```bash title="Aspire CLI" + aspire logs producer --search needle --tail 75 + ``` + ## See also - [aspire describe](../aspire-describe/) From 8c1881889676783e6a93e53ed6d3a4529255dacc Mon Sep 17 00:00:00 2001 From: James Newton-King Date: Fri, 29 May 2026 16:08:55 +0800 Subject: [PATCH 2/4] Apply suggestion from @JamesNK --- .../src/content/docs/reference/cli/commands/aspire-logs.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/frontend/src/content/docs/reference/cli/commands/aspire-logs.mdx b/src/frontend/src/content/docs/reference/cli/commands/aspire-logs.mdx index 8340c9dc5..46e0beba9 100644 --- a/src/frontend/src/content/docs/reference/cli/commands/aspire-logs.mdx +++ b/src/frontend/src/content/docs/reference/cli/commands/aspire-logs.mdx @@ -57,7 +57,7 @@ The following options are available: - **`-s, --search `** - Full-text search to filter log content. Only log lines whose message or resource name contains the specified text are shown. When connected to an AppHost that supports the v2 or later auxiliary backchannel, filtering is applied server-side before log lines are transferred, which significantly reduces overhead for large log streams. + Full-text search to filter log content. Only log lines whose message or resource name contains the specified text are shown. - **`-t, --timestamps`** From 083d67b19e61454e660e77e57f9e815e5eed6340 Mon Sep 17 00:00:00 2001 From: James Newton-King Date: Fri, 29 May 2026 16:12:56 +0800 Subject: [PATCH 3/4] Expand --search docs with multi-word AND logic, quoted phrases, and examples --- .../docs/reference/cli/commands/aspire-logs.mdx | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/frontend/src/content/docs/reference/cli/commands/aspire-logs.mdx b/src/frontend/src/content/docs/reference/cli/commands/aspire-logs.mdx index 46e0beba9..4201389d5 100644 --- a/src/frontend/src/content/docs/reference/cli/commands/aspire-logs.mdx +++ b/src/frontend/src/content/docs/reference/cli/commands/aspire-logs.mdx @@ -57,7 +57,7 @@ The following options are available: - **`-s, --search `** - Full-text search to filter log content. Only log lines whose message or resource name contains the specified text are shown. + Full-text search to filter log content. Only log lines whose message or resource name contains the specified text are shown. Multiple words are treated as separate fragments that must all match (AND logic). Use quoted phrases to match exact multi-word text (for example, `--search '"connection timeout"'`). All input is treated as plain free-text; field qualifier syntax such as `key:value` is not supported for console logs. - **`-t, --timestamps`** @@ -121,6 +121,18 @@ The following options are available: aspire logs --search "error" ``` +- Search with multiple words (all must match): + + ```bash title="Aspire CLI" + aspire logs --search "connection failed" + ``` + +- Search for an exact phrase using quotes: + + ```bash title="Aspire CLI" + aspire logs --search '"connection timeout"' + ``` + - Search logs for a specific resource and show only the last 75 matching lines: ```bash title="Aspire CLI" From b2cca462f4ad9d4ee012d96237866b37130cdc32 Mon Sep 17 00:00:00 2001 From: James Newton-King Date: Fri, 29 May 2026 16:15:10 +0800 Subject: [PATCH 4/4] Simplify --search option description --- .../src/content/docs/reference/cli/commands/aspire-logs.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/frontend/src/content/docs/reference/cli/commands/aspire-logs.mdx b/src/frontend/src/content/docs/reference/cli/commands/aspire-logs.mdx index 4201389d5..6edd0c67a 100644 --- a/src/frontend/src/content/docs/reference/cli/commands/aspire-logs.mdx +++ b/src/frontend/src/content/docs/reference/cli/commands/aspire-logs.mdx @@ -57,7 +57,7 @@ The following options are available: - **`-s, --search `** - Full-text search to filter log content. Only log lines whose message or resource name contains the specified text are shown. Multiple words are treated as separate fragments that must all match (AND logic). Use quoted phrases to match exact multi-word text (for example, `--search '"connection timeout"'`). All input is treated as plain free-text; field qualifier syntax such as `key:value` is not supported for console logs. + Full-text search to filter log content. Only log lines whose message or resource name contains the specified text are shown. Multiple words are treated as separate fragments that must all match. Use quoted phrases to match exact multi-word text (for example, `--search '"connection timeout"'`). - **`-t, --timestamps`**