Writes a message to the execution log.
class Logger method .log()
Logger is the Apps Script service.
.log() is the method name you will see after a dot in your code.
What it does
Why it's used
- Leave breadcrumbs while debugging a tricky trigger.
- See values in Executions when something fails in production.
Common errors
- Forgetting parentheses on log. Write Logger.log(), not Logger.log or log by itself.
- Skipping dots between chained calls. Each step needs a dot, like Logger.log().
- Adding spaces where they do not belong. Write Logger.log(), not Logger .log(), Logger.log (), or Logger . log().
- Wrong capitalization. Use Logger and log, not logger or log.
Snippets using this method
- Visicalc 2023 Design Walkthrough
- Visicalc 2023 Quick Walkthrough
- Take Screenshots from URLs in Google Sheets
- Send Better Email When Google Form Filled Out
- Sync Tabs in Different Sections
- Sync Many Tabs without ImportRange()
- Spreadsheet Automation for Beginners
- Shaman: AI Blog Writer
- Shaman: AI Blog Writer
- Shaman: AI Blog Writer
- SOLUTIONS! Solve The Errors, Learn For Loop
- SOLUTIONS! Solve The Errors, Learn For Loop
- Show Sheet Tabs Based on Edit
- Tag Emails From A List of Members in Google Sheets
- Twitter App Clone in a Google Sheet
- Sync Two Tabs Without ImportRange()
- Send a Daily Email with Inspiring Quote - A Little Pick Me Up
- Track Every Edit (Almost)
- Sheet Stories / Video Notes + Clear 24 Hour Old Videos
- Scrape Google Maps Added Phone and Reviews
- Scoping Functions in Apps Script
- Introducing SheetFools
- One Million Checkboxes
- Idea Graveyard - Create a Decaying Checklist
Explore
Related methods
More Apps Script
Better Sheets tutorials
2 New Ways To Add Emoji Reactions
Add Click Tracking To Your Google Sheets | Bitly in a Google Sheet
Add Tasks to Google Tasks From Google Sheets
Automate Form Response to Confirmation Email
Automate Google Sheets With Zero Experience
Automatically Backup a Spreadsheet
Basic CRM - Add a Powerful Script To Move Row Based on Status
Breaking Through Errors In Apps Script
Brighten Up Your Checklist Automatically
Built a Cookie Clicker Clone in Google Sheets
Can I Automatically Rename a Sheet based on a Date?
Can I get alerted when a tab name is changed?
Close Form After Certain Number of Responses
Create an Automated Task List
Create a PR Agency From Scratch
Create a Stop Watch in a Google Sheet
Create a Timer with Apps Script
Create Your Own Pride Flag Easter Egg in Sheets
Dylan Asks: How to Automatically Delete Rows If Cell Contains Value
Email Certain Department Based on Google Form Entries
Email Myself a Daily Random Motivational Quote
Embed Quote and Author to Daily Quote Website
Enter Google Drive File Name Get URL
Fast FAQS
Form Automations: Close Multiple Forms When Over Limit
Get Every Editor on Every Google File I Own
Google Maps Scraper for Outreach
Google Sheets Stories? No! But we'll add timestamped video notes to your google sheets.
How to Merge Cells in Google Sheets
How to Turn Background Color to Text
How to Validate Email Addresses
Idea Graveyard - Create a Decaying Checklist
Introducing SheetFools
Learn to Code in Google Sheets, For Programmers
LinkTree in a Google Sheet
MicroManager: Hourly Email Reminders
Onboarding Scheduler
One Million Checkboxes
Password Protecting Data In a Google Sheet
Password Protecting Data In a Google Sheet Part 2 The Basics
Scoping Functions in Apps Script
Scrape Google Maps
Scrape Google Maps Added Phone and Reviews
Send a Daily Email with Inspiring Quote - A Little Pick Me Up
Send Better Email When Google Form Filled Out
Shaman: AI Blog Writer
Show Sheet Tabs Based on Edit
SOLUTIONS! Solve The Errors, Learn For Loop
Solve The Errors, Learn For Loop
Sync Tabs in Different Sections
Sync Two Tabs Without ImportRange()
Tag Emails From A List of Members in Google Sheets
Take Screenshots from URLs in Google Sheets
Track Every Edit (Almost)
Visicalc 2023 Design Walkthrough
Related blog posts
Written guides about Logger.log().
Learn to Code in Google Sheets, For Programmers | For Advanced Google Sheet Users
If you know how to code, you'll learn in this step-by-step tutorial how to code in Google Sheets.
Read post →How to Send Google Forms Entries Automatically with Apps Script
Google Forms provides basic email notifications for form submissions, but enhancing these notifications with detailed summaries can significantly improve productivity and response management.
Read post →