`odo dev` should have `--logs` flag
--logs flag will enable automatic tailing of stderr and stdout logs from all containers and show it to stdout
blocked on #5715
odo dev without any flag prints below:
$ odo dev
__
/ \__ Developing using the devfile-nodejs-deploy Devfile
\__/ \ Namespace: myproject
/ \__/ odo version: v3.0.0-alpha3
\__/
↪ Deploying to the cluster in developer mode
✓ Creating kind Pod [16ms]
✓ Waiting for Kubernetes resources [8s]
✓ Syncing files into the container [205ms]
✓ Building your application in container on cluster [3s]
• Executing the application ...
Your application is now running on the cluster
- Forwarding from 127.0.0.1:40001 -> 3000
Watching for changes in the current directory /home/dshah/src/devfile-nodejs-deploy
Press Ctrl+c to exit `odo dev` and delete resources from the cluster
When the user modifies some file, it goes into a loop of printing this information again.
How should odo print the logs along with the odo dev output? What I can think of is simply dumping logs after odo is done printing the line Press Ctrl+c to exit ..... However, from an UX (UI?) perspective, this might be a bit ugly, depending on whom you ask.
Can you provide example output of how odo should print the logs to stdout when the user does odo dev --logs?
How should odo print the logs along with the
odo devoutput? What I can think of is simply dumping logs after odo is done printing the linePress Ctrl+c to exit ..... However, from an UX (UI?) perspective, this might be a bit ugly, depending on whom you ask.
I can't think of an approach other than this. When the user passes --logs flag, odo should first finish whatever it's doing w.r.t pushing the component to the cluster. Once it's done, it can start printing logs.
Whenever odo detects a change in code, the dev workflow is re-triggered. During this time, we should not log anything and resume only after dev workflow has completed (if it completes successfully.)
@kadel wdyt?
I can't think of an approach other than this. When the user passes
--logsflag, odo should first finish whatever it's doing w.r.t pushing the component to the cluster. Once it's done, it can start printing logs.Whenever odo detects a change in code, the dev workflow is re-triggered. During this time, we should not log anything and resume only after dev workflow has completed (if it completes successfully.)
@kadel wdyt?
+1
Blocked by #5933
Requires https://github.com/redhat-developer/odo/issues/6058