I'm trying to see output of a script, but when I go to "View Logs" I get an alert "No logs found. Use Logger API to add logs to your project."
How do I add the Logger API?
I'm trying to see output of a script, but when I go to "View Logs" I get an alert "No logs found. Use Logger API to add logs to your project."
How do I add the Logger API?
You will want to add into your code
Logger.log("Yes, this was logged");
Also reference this page for more info: https://developers.google.com/apps-script/reference/base/logger
Quote:
You need to have access to the Apps Script's Cloud Platform project in order to view the logs the script creates.
Apps Script Documentation - Logging Requirements
You can not just add:
console.log();
To your script and have it work.
From the "View" menu, choose "Console logs"
You will be prompted to Enable Console Logging.