You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2022/09/05 07:30:26 UTC
[GitHub] [camel-k] essobedo commented on a diff in pull request #3589: feat(cli): Add tail and tail-lines flags to the log command
essobedo commented on code in PR #3589:
URL: https://github.com/apache/camel-k/pull/3589#discussion_r962575233
##########
pkg/cmd/log.go:
##########
@@ -129,7 +134,13 @@ func (o *logCmdOptions) run(cmd *cobra.Command, args []string) error {
// Found the running integration so step over to scraping its pod log
//
fmt.Fprintln(cmd.OutOrStdout(), "Integration '"+integrationID+"' is now running. Showing log ...")
- if err := k8slog.Print(o.Context, cmd, c, &integration, cmd.OutOrStdout()); err != nil {
+ var tailLines *int64
+ if cmd.Flags().Lookup("tail-lines").Changed {
+ tailLines = &o.TailLines
+ } else if o.Tail {
+ tailLines = &[]int64{10}[0]
+ }
Review Comment:
Good catch, thx. Fixed
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org