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
I tried to import the BBLog.gs file alone as a library and try to execute a test function - I get an error inside the console
The function I used to test is
functionmyFunction(){varlock=LockService.getScriptLock();varlog=BBLog.getLog({level: BBLog.Level.ALL,sheetName: 'Log',displayFunctionNames: BBLog.DisplayFunctionNames.YES,displayUserId: BBLog.DisplayUserId.EMAIL_FULL,lock: lock});log.info('Test log to GSheet at INFO level');}
2022-03-24 09:42:36:600 -0400 000383 mark@XXXXX.com INFO at BBLog_.info (BBLog:331:8) Test log to GSheet at INFO level
In another scenario, when I add the library directly to the sheet and run a modified test function...
functionmyFunction(){varlock=LockService.getScriptLock();varlog=getLog({level: Level.ALL,sheetName: 'Log',displayFunctionNames: DisplayFunctionNames.YES,displayUserId: DisplayUserId.EMAIL_FULL,lock: lock});log.info('Test log to GSheet at INFO level');}
I get this output on the console
2022-03-24 10:15:33:363 -0400 000881 mark@XXXXX.com INFO at myFunction (Tests:11:7) Test log to GSheet at INFO level
and this line on the sheet
2022-03-24 10:15:32:819 -0400 000337 mark@XXXXX.com INFO at BBLog_.info (BBLog:331:8) Test log to GSheet at INFO level
I am wondering if this is because the configuration of depreciated runtime you have on your appsscript.json file?
It does look like you've found an issue with running it on V8. It is because DisplayFunctionNames is set to YES.
It has never been possible to have this set to YES and run the debugger, as BBLog throws and catches an error to get the function name, which stops the debugger running. But with V8 it looks like DisplayFunctionNames will not work running as normal or with the debugger.
Thanks for flagging this up. The DisplayFunctionNames was always a nasty gotcha that used to catch me out occasionally.
I tried to import the BBLog.gs file alone as a library and try to execute a test function - I get an error inside the console
The function I used to test is
The error inside the console
and I get this log line inserted on the sheet
In another scenario, when I add the library directly to the sheet and run a modified test function...
I get this output on the console
and this line on the sheet
I am wondering if this is because the configuration of depreciated runtime you have on your
appsscript.json
file?The text was updated successfully, but these errors were encountered: