mirror of
https://github.com/coder/coder.git
synced 2026-09-22 05:05:20 +08:00
feat(cli): add logs cmd (#21430)
This PR adds a command to view the provisioner and agent logs for a given workspace. Note: I did investigate using the existing `cliui` methods to tail the logs but they are tailored to a very specific use-case. Other changes: - Adds `Agents` to `dbfake.WorkspaceResponse` - Adds methods to generate provisioner and agent logs in `dbgen` --------- Co-authored-by: Steven Masley <Emyrk@users.noreply.github.com>
This commit is contained in:
co-authored by
Steven Masley
parent
49b34a716a
commit
0f446f99dd
Vendored
+1
@@ -28,6 +28,7 @@ SUBCOMMANDS:
|
||||
list List workspaces
|
||||
login Authenticate with Coder deployment
|
||||
logout Unauthenticate your local session
|
||||
logs View logs for a workspace
|
||||
netcheck Print network debug information for DERP and STUN
|
||||
notifications Manage Coder notifications
|
||||
open Open a workspace
|
||||
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
coder v0.0.0-devel
|
||||
|
||||
USAGE:
|
||||
coder logs [flags] <workspace>
|
||||
|
||||
View logs for a workspace
|
||||
|
||||
View logs for a workspace
|
||||
|
||||
OPTIONS:
|
||||
-n, --build-number int (default: 0)
|
||||
Only show logs for a specific build number. Defaults to 0, which maps
|
||||
to the most recent build (build numbers start at 1). Negative values
|
||||
are treated as offsets—for example, -1 refers to the previous build.
|
||||
|
||||
-f, --follow bool (default: false)
|
||||
Follow logs as they are emitted.
|
||||
|
||||
———
|
||||
Run `coder --help` for a list of global options.
|
||||
Reference in New Issue
Block a user