Viewing logs

Launching the Log Viewer

Cloud Code comes with a Log Viewer to help you monitor your application.

To launch the Log Viewer, type Cloud Code: View Logs using the Command Palette (accessible with Ctrl/Cmd+Shift+P or through the 'Manage' menu marked with a gear icon Manage icon).

Tip: You can also quickly access logs by finding your resource within the Kubernetes Explorer under the Cloud Code view Cloud Code icon, right-clicking it, and selecting View logs to display your specified logs in the Log Viewer.

Viewing logs from clusters

For clusters with Stackdriver Logging

If you have clusters with Stackdriver Logging enabled, you'll find all the logs from your current active Kubernetes cluster when opening the Log Viewer.

Log Viewer displaying logs from a currently active cluster, filtered by keyword 'daemonsets'

For clusters without Stackdriver Logging

If you have clusters without Stackdriver Logging, you'll need to select a deployment or pod to view logs from, using the deployment or pod field in the Log Viewer search box.

Viewing logs for a non-Stackdriver Logging cluster by setting the deployment
field within the Log Viewer search box to 'node-hello-world'

Streaming logs

If you'd like to get consistently updated logs, you can turn the 'Streaming' slider on.

Refining search results

You can perform basic text filtering on the results displayed within the Log Viewer by using the search box at the top of the page. This includes filtering by namespace, deployment, pod, container, and time. Additionally, for clusters with Stackdriver Logging, you can also filter by severity level.

Tip: You can change the display time to your preferred time zone by selecting the three-dotted menu icon next to the 'Time' column and choosing a time zone.

Refining log viewer results by setting time to 'Local time' using the three dotted menu near the time label as well as setting the deployment field within the search box to 'node-hello-world'

Getting Support

To send feedback, report issues on GitHub, or ask a question on Stack Overflow.