Skip to content

Commit

Permalink
Resolved the p and pr logs issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Senjuti256 committed Feb 6, 2024
1 parent 36c0340 commit 0d34d3b
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 8 deletions.
14 changes: 8 additions & 6 deletions docs/cmd/tkn_pipeline_logs.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,14 @@ Show logs for given Pipeline and PipelineRun:
### Options

```
-a, --all show all logs including init steps injected by tekton
-f, --follow stream live logs
-h, --help help for logs
-L, --last show logs for last PipelineRun
--limit int lists number of PipelineRuns (default 5)
-t, --timestamps show logs with timestamp
-a, --all show all logs including init steps injected by tekton
-f, --follow stream live logs
-h, --help help for logs
-L, --last show logs for last PipelineRun
--limit int lists number of PipelineRuns (default 5)
--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
--timestamps show logs with timestamp
```

### Options inherited from parent commands
Expand Down
10 changes: 9 additions & 1 deletion docs/man/man1/tkn-pipeline-logs.1
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,15 @@ Show Pipeline logs
lists number of PipelineRuns

.PP
\fB\-t\fP, \fB\-\-timestamps\fP[=false]
\fB\-\-prefix\fP[=true]
prefix each log line with the log source (task name and step name)

.PP
\fB\-t\fP, \fB\-\-task\fP=[]
show logs for mentioned Tasks only

.PP
\fB\-\-timestamps\fP[=false]
show logs with timestamp


Expand Down
4 changes: 3 additions & 1 deletion pkg/cmd/pipeline/logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,10 @@ Show logs for given Pipeline and PipelineRun:
c.Flags().BoolVarP(&opts.Last, "last", "L", false, "show logs for last PipelineRun")
c.Flags().BoolVarP(&opts.AllSteps, "all", "a", false, "show all logs including init steps injected by tekton")
c.Flags().BoolVarP(&opts.Follow, "follow", "f", false, "stream live logs")
c.Flags().BoolVarP(&opts.Timestamps, "timestamps", "t", false, "show logs with timestamp")
c.Flags().BoolVarP(&opts.Timestamps, "timestamps", "", false, "show logs with timestamp")
c.Flags().IntVarP(&opts.Limit, "limit", "", 5, "lists number of PipelineRuns")
c.Flags().BoolVarP(&opts.Prefixing, "prefix", "", true, "prefix each log line with the log source (task name and step name)")
c.Flags().StringSliceVarP(&opts.Tasks, "task", "t", []string{}, "show logs for mentioned Tasks only")

return c
}
Expand Down

0 comments on commit 0d34d3b

Please sign in to comment.