erotsppa
erotsppa

Reputation: 15021

No logs are created in Stackdriver logging

In my google app script, I have:

Logger.log("test");

and I even tried

console.log("test");

But neither is printed to the stackdriver log, even after I've set the project id to a Google Cloud Project id.

The screen shows:

enter image description here

Upvotes: 2

Views: 333

Answers (1)

Wicket
Wicket

Reputation: 38130

To being able to see the logs on Stackdriver your project should have linked to a Google Cloud Standard project instad of the default project otherwise you only could see the "Stackdriver logs" on the executions pages in https://script.google.com

From https://developers.google.com/apps-script/guides/logging#using_stackdriver_logging

Using Stackdriver Logging

Stackdriver logs are attached to the GCP project associated with your Apps Script. You can view a simplified version of these logs in the Apps Script dashboard. To make full use of Stackdriver Logging and its capabilities, use a standard GCP project with your script project. This lets you access Stackdriver logs directly in the GCP Console and gives you more viewing and filtering options.

Upvotes: 2

Related Questions