Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions plugins/sentry-cli/skills/sentry-cli/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,21 @@ Update the Sentry CLI to the latest version
- `--check - Check for updates without installing`
- `--method <value> - Installation method to use (curl, npm, pnpm, bun, yarn)`

### Log

View Sentry logs

#### `sentry log list <target>`

List logs from a project

**Flags:**
- `-n, --tail <value> - Number of log entries (1-1000) - (default: "100")`
- `-q, --query <value> - Filter query (Sentry search syntax)`
- `-f, --follow - Stream logs in real-time`
- `--pollInterval <value> - Poll interval in seconds (only with --follow) - (default: "2")`
- `--json - Output as JSON`

## Output Formats

### JSON Output
Expand Down
2 changes: 2 additions & 0 deletions src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { cliRoute } from "./commands/cli/index.js";
import { eventRoute } from "./commands/event/index.js";
import { helpCommand } from "./commands/help.js";
import { issueRoute } from "./commands/issue/index.js";
import { logRoute } from "./commands/log/index.js";
import { orgRoute } from "./commands/org/index.js";
import { projectRoute } from "./commands/project/index.js";
import { CLI_VERSION } from "./lib/constants.js";
Expand All @@ -28,6 +29,7 @@ export const routes = buildRouteMap({
project: projectRoute,
issue: issueRoute,
event: eventRoute,
log: logRoute,
api: apiCommand,
},
defaultCommand: "help",
Expand Down
27 changes: 27 additions & 0 deletions src/commands/log/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/**
* sentry log
*
* View and stream logs from Sentry projects.
*/

import { buildRouteMap } from "@stricli/core";
import { listCommand } from "./list.js";

export const logRoute = buildRouteMap({
routes: {
list: listCommand,
},
docs: {
brief: "View Sentry logs",
fullDescription:
"View and stream logs from your Sentry projects.\n\n" +
"Commands:\n" +
" list List or stream logs from a project\n\n" +
"Examples:\n" +
" sentry log list # Auto-detect from DSN\n" +
" sentry log list myorg/myproject # Explicit org/project\n" +
" sentry log list -f # Stream logs in real-time\n" +
" sentry log list -q 'level:error' # Filter to error level only",
hideRoute: {},
},
});
Loading
Loading