Configuring the plugin
Configuring the pluginAccessing Logs & Notifications

Accessing Logs & Notifications

Logging can be enabled to visualize the data involved in the execution of GraphQL queries, including:

  • Name of the query
  • Variables provided to the query
  • Execution response
  • Additional context (error message, etc)

The logs are stored under the wp-content/gatographql/logs folder.

Logs are available only when an extension can make use of it, including:

  • The Internal GraphQL Server extension logs the queries executed.
  • The Automation extension logs the queries executed by the persisted queries triggered by the automations.

Logs Settings

The logs settings can be found under Settings > Plugin Configuration > Logs.

Logs & Notifications settings
Logs & Notifications settings

In the Settings, we can configure:

  • Enable/disable logging and notifications (both enabled by default)
  • The severities that will be logged (🔴 Error and 🟡 Warning by default)
  • The severities that will trigger a notification (🔴 Error by default)

Log Severities

There are 4 severities:

SeverityDescription
🔴 ErrorCritical issues that prevent the operation from completing
🟡 WarningNon-critical issues that may affect the operation
🔵 InfoGeneral information about the operation
🟢 DebugDetailed information for debugging purposes

Notifications

Whenever an entry (for any of the configured severities) is added to the logs, a notification badge will be displayed in the plugin menu (both under the plugin name, and under the Logs menu item).

Notifications badge
Notifications badge

This is useful to track why queries (executed via the Internal GraphQL Server or the Automation extension) have failed.

Accessing the logs

The logs can be accessed by clicking on Logs in the plugin menu:

Browsing the logs
Browsing the logs

Clicking on a log entry can visualize that log in detail:

Viewing single log
Viewing single log

On the log details, clicking on the Download button will download the log file.

Maintaining the logs

To prevent logs from consuming excessive disk space, it's recommended to periodically clear them.