Using
UsingLogs & Notifications

Logs & Notifications

The logs display the data involved in the execution of each GraphQL query, 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/gato-ai-translations-for-polylang/logs folder.

The logs help us find out what's wrong when translations don't go through.

Logs Settings

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

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
Example: The API key is missing
🟑 WarningNon-critical issues that may affect the operation
Example: There are no posts to translate
πŸ”΅ InfoGeneral information about the operation
Example: Request sent to the API
🟒 DebugDetailed information for debugging purposes
Example: Successful operation

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 know that a translation has failed, and to browse the logs to find out what the problem is.

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.

Queries

In each log entry, the [Query "..."] section indicates which query was executed:

  • "create-missing-translation-customposts": Query that creates the translation entries for custom posts
  • "translate-customposts": Query that translates the custom posts
  • "create-missing-translation-media": Query that creates the translation entries for media items
  • "translate-media": Query that translates the media properties
  • Others

Maintaining the logs

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