IntroductionEnabling LoggingWarning MessageLogging SettingsViewing LogsDeleting Logs
Introduction
For quite a while, enabling logging has been a go-to method for debugging any issues within Gravity Forms. As of Gravity Forms version 2.2, logging functionality has been moved from being a separate add-on, and is now a core feature.
In this article, we will show you how to enable and configure logging within Gravity Forms.
Note: If you have the a role management plugin active, such as Members, you』ll need to ensure that your user has the correct permissions active to acccess logging.
Enabling Logging
To enable logging, simply enable it within the Gravity Forms settings page.
Access the Settings page by hovering over Forms on the left side menu within your WordPress dashboard, then click on Settings Next, scroll down to Logging and set it to On.
Once complete, don』t forget to save your settings.
If you』re going to send the system report or logs to support, keep logging on until the end of the issue resolution. If you turn off logging before that the logs will be deleted!
Warning Message
As of Gravity Forms 2.4, the following non-dismissible security notice will be displayed on every WordPress admin page when logging is enabled:
This is because log files can contain sensitive information stored in plain text, and should not be left running, nor left in an insecure network accessible server for extended periods.
If you enabled logging per support service request, you need to keep logging enabled during the ticket handling to allow the support staff to check your logs. When logging is disabled, the logs are deleted.
The message can be removed by turning off logging using Gravity Forms > Settings or by adding the GF_LOGGING_DISABLE_NOTICE constant to your wp-config.php file and setting it to true.
define( 'GF_LOGGING_DISABLE_NOTICE', true );
Logging Settings
Once logging is enabled within your Gravity Forms settings, an additional Settings item will appear labeled Logging. To configure any settings related to logging in Gravity Forms, simply access this tab.
Within the Logging tab, you』ll see Gravity Forms as well as any Gravity Forms add-ons that you have installed. Each of these can be configured to enable/disable logging, as well as make changes to the information that is logged.
If you』ve narrowed down exactly where you』re having issues, you might want to enable any additional add-ons.
Viewing Logs
To access the logs that are generated, take a look at the Logging tab of the Settings page. Below each item, you will see links to view or delete the logs for that particular item.
If you don』t see these things, be sure that logging has been enabled, and logs have been generated. If nothing exists within the logs, a link to display them will not appear.
Also note log files have a maximum size of 5MB, once a log file gets bigger, it』s renamed and a brand new log file with the original name is created to store additional logging messages. You can download rotated log files from /wp-content/uploads/gravity_forms/logs/ using a FTP client.
Deleting Logs
Logs are deleted almost exactly the same as they are viewed. To delete your logs, simply click on the Delete Logs link instead of the View Logs link on the logging settings tab.