Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--output has no effect #384

Open
rhuss opened this issue Nov 5, 2024 · 2 comments
Open

--output has no effect #384

rhuss opened this issue Nov 5, 2024 · 2 comments
Labels
kind/bug Categorizes issue or PR as related to a bug. triage/accepted Issues which should be fixed (post-triage)

Comments

@rhuss
Copy link
Contributor

rhuss commented Nov 5, 2024

⛵ kind-knative Documents/Talks/wjax-knative-2024/demo
10:54 ✗ kn event send -o yaml --to demo -f message=Hello
📬 Sending event within the cluster Done
3582 INFO Event (ID: 9a07dbd5-5767-4368-a611-34649527b076) have been sent.

⛵ kind-knative Documents/Talks/wjax-knative-2024/demo
10:54 ➜ kn event send -o human --to demo -f message=Hello
📬 Sending event within the cluster Done
4093 INFO Event (ID: a5ba200e-fa68-4a1b-a630-3512c88c31ea) have been sent.

⛵ kind-knative Documents/Talks/wjax-knative-2024/demo
10:55 ➜ kn event send -o json --to demo -f message=Hello
📬 Sending event within the cluster Done
3901 INFO Event (ID: 0ea7a3d4-09d1-42e1-9d02-1a6b95fb0e4b) have been sent.

What is --output supposed to do ?
(minor nit: It's "Event .... has been sent", not "Event ... have been sent")

@cardil
Copy link
Contributor

cardil commented Dec 4, 2024

Thanks for raising this.

The output is still used for the build command. It influences the way the CE is printed.

Before recent changes, it was also used to change the format of the logs. Now the logging is relying on knative.dev/client/pkg/output/logging package, and it misses the changing the format feature. The current logging package puts logs to STDERR in a human-readable format, and to a log file (within user's home dir) in JSON format.

TBH, I don't know if this feature is worth implementing. Maybe the easiest would be to just move the --output flag to the build sub-command, and remove it from the global flags.

/kind bug
/triage accepted

@knative-prow knative-prow bot added kind/bug Categorizes issue or PR as related to a bug. triage/accepted Issues which should be fixed (post-triage) labels Dec 4, 2024
@cardil
Copy link
Contributor

cardil commented Dec 4, 2024

Although, if we do the #383, this flag will have a perfect reason for existing on the send command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. triage/accepted Issues which should be fixed (post-triage)
Projects
None yet
Development

No branches or pull requests

2 participants