Skip to content

Commit

Permalink
Resolved the logs issue, unit tests pending
Browse files Browse the repository at this point in the history
  • Loading branch information
Senjuti256 committed Feb 8, 2024
1 parent 2c3e315 commit 86a83e4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/cmd/tkn_pipeline_logs.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ Show logs for given Pipeline and PipelineRun:
-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, --timestamps show logs with timestamp
```

Expand Down
4 changes: 4 additions & 0 deletions docs/man/man1/tkn-pipeline-logs.1
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ Show Pipeline logs
\fB\-\-limit\fP=5
lists number of PipelineRuns

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

.PP
\fB\-t\fP, \fB\-\-timestamps\fP[=false]
show logs with timestamp
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/pipeline/logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ Show logs for given Pipeline and PipelineRun:
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().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)")
return c
}

Expand Down

0 comments on commit 86a83e4

Please sign in to comment.