Skip to content

Commit 86a83e4

Browse files
committed
Resolved the logs issue, unit tests pending
1 parent 2c3e315 commit 86a83e4

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

docs/cmd/tkn_pipeline_logs.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ Show logs for given Pipeline and PipelineRun:
4040
-h, --help help for logs
4141
-L, --last show logs for last PipelineRun
4242
--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)
4344
-t, --timestamps show logs with timestamp
4445
```
4546

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ Show Pipeline logs
3939
\fB\-\-limit\fP=5
4040
lists number of PipelineRuns
4141

42+
.PP
43+
\fB\-\-prefix\fP[=true]
44+
prefix each log line with the log source (task name and step name)
45+
4246
.PP
4347
\fB\-t\fP, \fB\-\-timestamps\fP[=false]
4448
show logs with timestamp

pkg/cmd/pipeline/logs.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ Show logs for given Pipeline and PipelineRun:
9797
c.Flags().BoolVarP(&opts.Follow, "follow", "f", false, "stream live logs")
9898
c.Flags().BoolVarP(&opts.Timestamps, "timestamps", "t", false, "show logs with timestamp")
9999
c.Flags().IntVarP(&opts.Limit, "limit", "", 5, "lists number of PipelineRuns")
100-
100+
c.Flags().BoolVarP(&opts.Prefixing, "prefix", "", true, "prefix each log line with the log source (task name and step name)")
101101
return c
102102
}
103103

0 commit comments

Comments
 (0)