1. Home
  2. Docs
  3. Site
  4. Logs

Logs

The debug.log in WordPress is a crucial tool that captures errors, warnings, and notices generated by WordPress core, plugins, or themes. If logging is enabled in the WP Config settings of FlyWP, all the WordPress-related logs will be directed to this log, aiding in diagnosing issues and optimizing site behavior.

Table of Contents

  1. Accessing the Logs Page
  2. Understanding Log Entries
  3. Refreshing the Log Page
  4. Common Log Messages and Troubleshooting

Accessing the Logs Page

  1. Navigate to the FlyWP dashboard and select the desired site.
  2. Click on the “Logs” option in the left sidebar. This will display the entries from the debug.log of the selected WordPress site.

Understanding Log Entries

Each entry in the debug.log comprises:

  • Timestamp: Provides the exact date and time of the log entry, helping to trace when a specific error or warning occurred.
  • Type of Log: Indicates whether the log is a notice, warning, error, or deprecated message.
  • Description: Details the specific message or issue, often providing hints about which plugin, theme, or core function might be causing it.

Refreshing the Log Page

  • On the “Logs” page, there’s a “Refresh” option at the top-right. Clicking this will reload the logs, allowing you to view the most recent entries without navigating away.

Common Log Messages and Troubleshooting

  1. PHP Deprecated: This means that a PHP function used is outdated and might not be supported in future PHP versions. It’s essential to update the theme or plugin causing this or contact the developer.
  2. Warning: Warnings indicate non-fatal issues, which means that while there might be a problem, it hasn’t stopped the execution of the script. However, addressing warnings ensures optimal performance.
  3. Error: These are critical issues that halt the script’s execution. Errors should be addressed immediately to ensure your site’s functionality.
  4. Notice: These are less critical than warnings and are mainly for developers to address potential issues in the code.

Important Considerations for Logging on High Traffic and Production Sites

For websites that experience high traffic or are in a live production environment, it is recommended to disable logging. Continuously writing to the debug.log in such situations can introduce performance overheads and may slow down your site, affecting the user experience. Always ensure that you have resolved any critical issues before disabling logging on your production site.

Furthermore, FlyWP has implemented a logrotate configuration for the debug.log. This means that the log file is automatically rotated daily to prevent it from becoming overly large and consuming excessive storage. With this configuration, FlyWP retains 7 days of compressed log files, ensuring that you have access to recent logs while efficiently managing storage space.