You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First, thank you very much for BetterLog. It's a great tool.
For security reasons I'm not able to use Libraries in my script. I'm using BetterLog as a library during development but will soon need to cut and paste it so that my scripts are self-contained. The instructions imply this is possible, but I haven't been able to figure out how. I am a complete noob at GAS and Javascript in general so I am probably missing something very simply.
Wrote the following test function in the project's Code.js file
function testBetterLog() {
Logger = BetterLog.useSpreadsheet("1v5PMxB1XomareGgLOjo9LNEuj6GNBdMjczJ3YnPra5Q");
Logger.log("hello");
}
Saved both files
Run
Acknowledge the permissions
Get the error: ReferenceError: "BetterLog" is not defined. (line 2, file "Code")
Please advise how I can use the source of BetterLog in my application.
Thanks again,
Mike
The text was updated successfully, but these errors were encountered:
You'll need to wrap all of the code in an object and modify the function definitions to use it locally. Note the commas after each function. In the same way I've done it with the CBL library. If you make a start I'll be happy to look it over:
Hi -
First, thank you very much for BetterLog. It's a great tool.
For security reasons I'm not able to use Libraries in my script. I'm using BetterLog as a library during development but will soon need to cut and paste it so that my scripts are self-contained. The instructions imply this is possible, but I haven't been able to figure out how. I am a complete noob at GAS and Javascript in general so I am probably missing something very simply.
Here's what I've done
function testBetterLog() {
Logger = BetterLog.useSpreadsheet("1v5PMxB1XomareGgLOjo9LNEuj6GNBdMjczJ3YnPra5Q");
Logger.log("hello");
}
Please advise how I can use the source of BetterLog in my application.
Thanks again,
Mike
The text was updated successfully, but these errors were encountered: