camel-tooling / vscode-camelk

Visual Studio extensions to support Camel K
Apache License 2.0
11 stars 13 forks source link

Enhance the console output for followed Camel-k logs #39

Open bfitzpat opened 5 years ago

bfitzpat commented 5 years ago

Per apupier - "maybe in a next iteration but it seems that Kubernetes extension is providing a nice Log viewer as a view or an editor. it might be better than using the podOutputChannel (and still cannot test but it seems that in case of several pod, the log will be mixed in it, isn't it?)"

Me - So far as I know, we can't rely on elements from other extensions -- has that changed?

Aurelien - you're right. Then maybe in a next iteration, duplicate the log editor code (or find a way to extract it as a normal javascript extension and submit it)

Good thoughts here - we will have to see what we can do to improve it.

bfitzpat commented 5 years ago

Looks like this is one of the issues - https://github.com/Azure/vscode-kubernetes-tools/issues/460

bfitzpat commented 5 years ago

And perhaps this is the webview they've added - https://github.com/Azure/vscode-kubernetes-tools/blob/master/src/components/logs/logsWebview.ts

bfitzpat commented 5 years ago

We cannot add color to the output channel apparently. (Tried using the Chalk https://www.npmjs.com/package/chalk library and it's just ignored.)

apupier commented 5 years ago

We cannot add color to the output channel apparently. (Tried using the Chalk https://www.npmjs.com/package/chalk library and it's just ignored.)

seems to be related to this feature request https://github.com/Microsoft/vscode/issues/571

bfitzpat commented 5 years ago

Though we could go with an approach similar to what the Kubernetes extension is doing with webview, I would rather not open a separate window (essentially an editor) when we already have the output channels down below. It may be the only way to get "prettier" text for the logs, but it seems like a workaround more than anything else...

And I don't believe the Colorizer approach (https://code.visualstudio.com/api/extension-capabilities/theming) will work, since it applies to code syntax coloring in editors and views, not specifically the output channels.

bfitzpat commented 4 years ago

Looks like spinning out the logs into separate windows like the Kubernetes extension may actually give us the functionality we are looking for. A new request for having more information more readily available (perhaps something like https://twitter.com/LostInTangent/status/1207718123241033728 or https://twitter.com/LostInTangent/status/1211342492324388864).

If we spin up these log windows as separate from the output view, we can move them around like we want. We can also look at finding a way to get easier access to the log for the Camel K operator.

image(3)