---
title: Using the New Error Logging Script Step in FileMaker 18
description: Using the new error logging script step in FileMaker 18
---

[MainSpring Blog](https://blog.gomainspring.com)

# [Using the New Error Logging Script Step in FileMaker 18](https://blog.gomainspring.com/filemaker-community/using-the-new-error-logging-script-in-filemaker-18)

 Written by [Patrick Briggs](https://blog.gomainspring.com/author/pbriggs) | June 14, 2019 at 4:59 PM

In FileMaker 18, we received a new script step called *Error Logging*. When this script step is used, any errors that are generated from the running script are pulled into a log for review.

#### Parameters for the error logging script step in FileMaker 18

The step allows for two  
 parameters. The first is whether to turn the logging on or off. Once error  
 logging is turned on, any time a script in the current file generates an error,  
 a file called ScriptsError.log will be created or appended to for as long as  
 the file is open or if the script step is called again with the login set to  
 off.

The error log captures the following:

The second parameter, Custom Debug Info, is optional. It’s set by clicking the gear icon in the script step. This will open up a calculation dialogue whose result will be appended to any entries created. This can be useful to capture other information not handled by the error log. I like to use a custom function called *ErrorData* which looks like so:

Here’s what the output looks like when opened using the console:

#### Output of the error logging script step in FileMaker 18

The ScriptErrors.log file  
 lives in the user’s documents’ folder and is accessible via the new [data file script steps](https://gomainspring.com/filemaker-community/data-file-script-steps-in-filemaker-18/) by  
 providing the filepath:

Get( DocumentsPath ) &  
 “ScriptErrors.log”

Be advised that the file  
 will be locked and inaccessible by the data file script steps until the Set  
 Error Logging script step is turned off, so it’s a good idea to turn off error  
 logging once you have executed the portions of a script you anticipate could  
 generate errors.

Also note that the error  
 logging state is specific to the file it was called in, so if you are calling a  
 script that generates an error from another file with a parent script where you  
 have error logging turned on, it will **not**  
 create a new log entry. You have to turn error logging on a per file basis. FileMaker  
 has a helpful tutorial video [here](https://www.filemaker.com/learning/custom-app-academy/303/file-based-script-steps-and-script-error-logging.html) that nicely covers the  
 basics.

This tool gives us more options on how we can handle errors in an app, which means at the end of the day it’s a better overall experience for users and developers alike. I can’t wait to see how the community utilizes the new step. And, as always—Happy FileMaking folks!

[View full post](https://blog.gomainspring.com/filemaker-community/using-the-new-error-logging-script-in-filemaker-18)

```json
{
  "@context" : "http://schema.org",
  "@type" : "BlogPosting",
  "author" : {
    "@type" : "Person",
    "name" : "Patrick Briggs"
  },
  "dateModified" : "2024-05-07T21:14:02.696Z",
  "datePublished" : "2019-06-14T16:59:22Z",
  "headline" : "Using the New Error Logging Script Step in FileMaker 18",
  "image" : {
    "@type" : "ImageObject",
    "height" : 3128,
    "url" : "https://617562.fs1.hubspotusercontent-na1.net/hubfs/617562/Imported_Blog_Media/22064879_xl-2.jpg",
    "width" : 3128
  },
  "mainEntityOfPage" : "https://blog.gomainspring.com/filemaker-community/using-the-new-error-logging-script-in-filemaker-18",
  "publisher" : {
    "@type" : "Organization",
    "logo" : {
      "@type" : "ImageObject",
      "height" : 60.0,
      "url" : "https://617562.fs1.hubspotusercontent-na1.net/hubfs/617562/elementor/mainspring-logo-cybersecurity-it-services-automation.png",
      "width" : 184.45715
    },
    "name" : "MainSpring Blog"
  }
}
```