diff --git a/packages/cli/src/cli/commands/project/logs.ts b/packages/cli/src/cli/commands/project/logs.ts index 602ca8fc..5e0ea259 100644 --- a/packages/cli/src/cli/commands/project/logs.ts +++ b/packages/cli/src/cli/commands/project/logs.ts @@ -350,9 +350,9 @@ export function getLogsCommand(): Command { normalizeDatetime, ) .addOption( - new Option("--level ", "Filter by log level") - .choices([...LogLevelSchema.options]) - .hideHelp(), + new Option("--level ", "Filter by log level").choices([ + ...LogLevelSchema.options, + ]), ) .option("-n, --limit ", "Results per page (1-1000, default: 50)") .option("-f, --follow", "Stream new logs as they arrive") diff --git a/packages/cli/tests/cli/logs.spec.ts b/packages/cli/tests/cli/logs.spec.ts index 2b54b8f8..0da92dd3 100644 --- a/packages/cli/tests/cli/logs.spec.ts +++ b/packages/cli/tests/cli/logs.spec.ts @@ -311,6 +311,13 @@ describe("logs command", () => { t.expectResult(result).toFail(); }); + it("documents --level in --help", async () => { + const result = await t.run("logs", "--help"); + + t.expectResult(result).toSucceed(); + t.expectResult(result).toContain("--level "); + }); + it("filters function logs by --level", async () => { await t.givenLoggedInWithProject(fixture("basic")); t.api.mockFunctionLogs("my-function", [