peterherrmann / BetterLog

With one line of code, BetterLog extends the native apps script Logger and gives you automatic additional features like logging to a spreadsheet and more.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

to stackdriver without spreadsheet?

coderofsalvation opened this issue · comments

Hi thx for this amazing job.
I discovered this repo after pulling my hair out trying to log webapp-calls using appscript :)

I noticed your last version mentioning 'Logger.log will now log to stackdriver' or something.
Is this possible directly using BetterLog.log(....) without having to call the .use(...)-spreadsheet function?

I can't seem to log my doPost()-calls into the appscript (simple stackdriver) dashboard, and I'm not sure whether its due to nested use of appscript libraries or not.

ps. Logger.log is not prone to hoisting effects right? I remember reading in the docs that the Logger.log-instance of the main-script is supposed to be shared across modules.

I noticed your last version mentioning 'Logger.log will now log to stackdriver' or something.
Is this possible directly using BetterLog.log(....) without having to call the .use(...)-spreadsheet function?

I think I'm correct in thinking that unless you call the useSpreadsheet() you won't have an object with which to then call .log() it'll just give you an "BetterLog undefined" error.

I can't seem to log my doPost()-calls into the appscript (simple stackdriver) dashboard, and I'm not sure whether its due to nested use of appscript libraries or not.

You can try simply using console.log() calls from your doPost() to get trace into Stackdriver.

Thanks, actually the spreadsheet feature is superhandy because I think I'm dealing with some kind of doPost-edgecase where none of console.log console.info, Logger.log, or Betterlog.log-function logs to stackdriver at all.
I'm not totally sure of the cause, but at least I can log into the spreadsheet, so hopefully later I'll find out the exact cause (and somehow report it to the appscript maintainers).