Skip to content

Commit 0d34d3b

Browse files
committed
Resolved the p and pr logs issue
1 parent 36c0340 commit 0d34d3b

3 files changed

Lines changed: 20 additions & 8 deletions

File tree

docs/cmd/tkn_pipeline_logs.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,14 @@ Show logs for given Pipeline and PipelineRun:
3535
### Options
3636

3737
```
38-
-a, --all show all logs including init steps injected by tekton
39-
-f, --follow stream live logs
40-
-h, --help help for logs
41-
-L, --last show logs for last PipelineRun
42-
--limit int lists number of PipelineRuns (default 5)
43-
-t, --timestamps show logs with timestamp
38+
-a, --all show all logs including init steps injected by tekton
39+
-f, --follow stream live logs
40+
-h, --help help for logs
41+
-L, --last show logs for last PipelineRun
42+
--limit int lists number of PipelineRuns (default 5)
43+
--prefix prefix each log line with the log source (task name and step name) (default true)
44+
-t, --task strings show logs for mentioned Tasks only
45+
--timestamps show logs with timestamp
4446
```
4547

4648
### Options inherited from parent commands

docs/man/man1/tkn-pipeline-logs.1

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,15 @@ Show Pipeline logs
4040
lists number of PipelineRuns
4141

4242
.PP
43-
\fB\-t\fP, \fB\-\-timestamps\fP[=false]
43+
\fB\-\-prefix\fP[=true]
44+
prefix each log line with the log source (task name and step name)
45+
46+
.PP
47+
\fB\-t\fP, \fB\-\-task\fP=[]
48+
show logs for mentioned Tasks only
49+
50+
.PP
51+
\fB\-\-timestamps\fP[=false]
4452
show logs with timestamp
4553

4654

pkg/cmd/pipeline/logs.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,10 @@ Show logs for given Pipeline and PipelineRun:
9595
c.Flags().BoolVarP(&opts.Last, "last", "L", false, "show logs for last PipelineRun")
9696
c.Flags().BoolVarP(&opts.AllSteps, "all", "a", false, "show all logs including init steps injected by tekton")
9797
c.Flags().BoolVarP(&opts.Follow, "follow", "f", false, "stream live logs")
98-
c.Flags().BoolVarP(&opts.Timestamps, "timestamps", "t", false, "show logs with timestamp")
98+
c.Flags().BoolVarP(&opts.Timestamps, "timestamps", "", false, "show logs with timestamp")
9999
c.Flags().IntVarP(&opts.Limit, "limit", "", 5, "lists number of PipelineRuns")
100+
c.Flags().BoolVarP(&opts.Prefixing, "prefix", "", true, "prefix each log line with the log source (task name and step name)")
101+
c.Flags().StringSliceVarP(&opts.Tasks, "task", "t", []string{}, "show logs for mentioned Tasks only")
100102

101103
return c
102104
}

0 commit comments

Comments
 (0)