What is the purpose of the `Logger.log()` function in the context of error handling?

Question

Grade: Education Subject: Support
What is the purpose of the `Logger.log()` function in the context of error handling?
Asked by:
84 Viewed 84 Answers

Answer (84)

Best Answer
(248)
`Logger.log()` is used to record information, including error messages, to the Apps Script execution log. This is invaluable for debugging and understanding why an error occurred. You can view the logs in the Apps Script editor under 'Executions'.