Visualizzare i log di Cloud Run in Cloud Code for VS Code
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Il visualizzatore log di Cloud Code fornisce strumenti per la ricerca e il
filtro dei log.
Per visualizzare i log di un servizio Cloud Run, segui questi passaggi:
Per aprire il visualizzatore log, apri la tavolozza dei comandi (premi Ctrl/Cmd+Shift+P o fai clic su Visualizza > Tavolozza comandi) e poi esegui Cloud Code: Visualizza log.
Seleziona Log Cloud Run dall'elenco Tipo log.
Seleziona un servizio Cloud Run dall'elenco Servizio.
Per visualizzare i log di una determinata revisione, selezionala utilizzando l'elenco
Revisione.
Per perfezionare i risultati di ricerca, fai clic su Log di ricerca e digita i termini di ricerca. Questa ricerca include lo spazio dei nomi, il deployment, il pod, il contenitore
e l'ora. Per i cluster con Cloud Logging abilitato, puoi anche filtrare in base al livello di gravità.
Visualizzazione dei log per una risorsa specifica
Per visualizzare i log di una risorsa specifica:
Fai clic su Cloud Code ed espandi l'esploratore Cloud Run.
Fai clic con il tasto destro del mouse su una risorsa e poi su Visualizza log.
Visualizzazione dei log di streaming
Per fare in modo che il visualizzatore log mostri i log aggiornati man mano che vengono generati, attiva il cursore Streaming nel visualizzatore log.
Richiedi assistenza
Per inviare feedback, segnala i problemi su
GitHub o fai una domanda su
Stack Overflow.
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Difficile da capire","hardToUnderstand","thumb-down"],["Informazioni o codice di esempio errati","incorrectInformationOrSampleCode","thumb-down"],["Mancano le informazioni o gli esempi di cui ho bisogno","missingTheInformationSamplesINeed","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 2025-09-05 UTC."],[[["\u003cp\u003eThe Cloud Code Log Viewer allows users to search and filter logs for specific information.\u003c/p\u003e\n"],["\u003cp\u003eLogs from a Cloud Run service can be accessed through the command palette by selecting 'Cloud Code: View Logs' and then specifying the Cloud Run service and revision.\u003c/p\u003e\n"],["\u003cp\u003eUsers can refine their log searches by using the 'Search Logs' function and entering specific terms, including namespace, deployment, pod, container, and time.\u003c/p\u003e\n"],["\u003cp\u003eLogs for a specific resource can be accessed directly by right-clicking the resource within the Cloud Run explorer and selecting 'View logs'.\u003c/p\u003e\n"],["\u003cp\u003eThe Log Viewer can display updated logs in real-time when the 'Streaming' slider is turned on.\u003c/p\u003e\n"]]],[],null,["# View Cloud Run logs in Cloud Code for VS Code\n\nThe Cloud Code Log Viewer provides tools for searching and\nfiltering logs.\n\nTo view logs from a Cloud Run service, follow these steps:\n\n1. To open the Log Viewer, open the command palette (press `Ctrl`/`Cmd`+`Shift`+`P` or click **View** \\\u003e **Command Palette** ) and then run **Cloud Code: View Logs**.\n2. Select **Cloud Run Logs** from the **Log Type** list.\n3. Select a Cloud Run service from the **Service** list.\n4. To view the logs from a particular revision, select a revision using the **Revision** list.\n5. To refine your search results, click **Search Logs** and then type search terms. This search includes the namespace, deployment, pod, container, and time. For clusters with Cloud Logging enabled, you can also filter by severity level.\n\nViewing logs for a specific resource\n------------------------------------\n\nTo view the logs for a specific resource, follow these steps:\n\n1. Click **Cloud Code** and then expand the **Cloud Run** explorer.\n2. Right-click a resource and then click **View logs**.\n\nViewing streaming logs\n----------------------\n\nTo have the Log Viewer display updated logs as the logs are generated, in\nthe Log Viewer, turn the **Streaming** slider on.\n\nGet Support\n-----------\n\nTo send feedback, report issues on [GitHub](https://github.com/GoogleCloudPlatform/cloud-code-vscode/issues), or ask a question on [Stack Overflow](https://stackoverflow.com/questions/ask?tags=cloud-code-vscode)."]]