I'm trying to implement the onEdit(e) simple trigger of Google Sheets. Everytime I try execute even a simple function such as:
function onEdit(e){
Logger.log(e.oldValue);
}
I get the following error:
My step by step:
I've tried following these two videos with no success:
https://www.youtube.com/watch?v=eWn_JxPSbds
https://www.youtube.com/watch?v=L1_nIhiVc5M
EDIT: SOLUTION
Thanks to @JPV and @TheMaster for the two potential solutions:
I was viewing the "Logs" and not the "Stackdriver Logging".
It seems you need to disable the V8 to view it in Logs, but need the Stackdriver Logging to view it with V8.
At least that seems to be the case with me
EDIT TWO
Here's the documentation where the issue is addressed:
https://developers.google.com/apps-script/guides/v8-runtime#ui_changes_for_logging
"If your script uses the Rhino runtime, selecting View > Logs in the Apps Script editor only shows you recent logs written by the Logger service. You must select View > Stackdriver Logging to see logs written with the console class."
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…