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
5 changes: 5 additions & 0 deletions docs/cmd/tkn_pipelinerun_logs.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ Show the logs of PipelineRun named 'microservice-1' for Task 'build' only from n
Show the logs of PipelineRun named 'microservice-1' for all Tasks and steps (including init steps) from namespace 'foo':

tkn pr logs microservice-1 -a -n foo

Show the logs of PipelineRun named 'microservice-1' for failed Tasks only from namespace 'bar':

tkn pr logs microservice-1 --log-failed -n bar


### Options
Expand All @@ -37,6 +41,7 @@ Show the logs of PipelineRun named 'microservice-1' for all Tasks and steps (inc
-h, --help help for logs
-L, --last show logs for last PipelineRun
--limit int lists number of PipelineRuns (default 5)
--log-failed show logs for failed tasks only
--long show logs with task display name (display name and step name)
--prefix prefix each log line with the log source (task name and step name) (default true)
-t, --task strings show logs for mentioned Tasks only
Expand Down
16 changes: 16 additions & 0 deletions docs/man/man1/tkn-pipelinerun-logs.1
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ Show the logs of a PipelineRun
\fB\-\-limit\fP=5
lists number of PipelineRuns

.PP
\fB\-\-log\-failed\fP[=false]
show logs for failed tasks only

.PP
\fB\-\-long\fP[=false]
show logs with task display name (display name and step name)
Expand Down Expand Up @@ -119,6 +123,18 @@ tkn pr logs microservice\-1 \-a \-n foo
.fi
.RE

.PP
Show the logs of PipelineRun named 'microservice\-1' for failed Tasks only from namespace 'bar':

.PP
.RS

.nf
tkn pr logs microservice\-1 \-\-log\-failed \-n bar

.fi
.RE


.SH SEE ALSO
.PP
Expand Down
5 changes: 5 additions & 0 deletions pkg/cmd/pipelinerun/logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ Show the logs of PipelineRun named 'microservice-1' for Task 'build' only from n
Show the logs of PipelineRun named 'microservice-1' for all Tasks and steps (including init steps) from namespace 'foo':

tkn pr logs microservice-1 -a -n foo

Show the logs of PipelineRun named 'microservice-1' for failed Tasks only from namespace 'bar':

tkn pr logs microservice-1 --log-failed -n bar
`

c := &cobra.Command{
Expand Down Expand Up @@ -86,6 +90,7 @@ Show the logs of PipelineRun named 'microservice-1' for all Tasks and steps (inc
c.Flags().BoolVarP(&opts.Prefixing, "prefix", "", true, "prefix each log line with the log source (task name and step name)")
c.Flags().BoolVarP(&opts.Long, "long", "", false, "show logs with task display name (display name and step name)")
c.Flags().BoolVarP(&opts.ExitWithPrError, "exit-with-pipelinerun-error", "E", false, "exit with pipelinerun to the unix shell, 0 if success, 1 if error, 2 on unknown status")
c.Flags().BoolVarP(&opts.Failed, "log-failed", "", false, "show logs for failed tasks only")
c.Flags().StringSliceVarP(&opts.Tasks, "task", "t", []string{}, "show logs for mentioned Tasks only")
c.Flags().IntVarP(&opts.Limit, "limit", "", defaultLimit, "lists number of PipelineRuns")
return c
Expand Down
Loading
Loading