How to Diagnose Magento 2 Errors

By default Magento 2 will store its error logs under the  [magento folder]/var/log/ folder.

There are 3 log files in the/var/log folder:

  • debug.log
  • install.log
  • system.log
Reading Error Files

To read your error logs, open it in your favorite editor.
Your error log file contains the following format:

[error time] main.error_type error_description

Magento log system has several log levels:

  • Debug – detailed debug information.
  • Info – interesting events.
  • Notice – normal but significant events.
  • Warning – exceptional occurrences that are not errors.
  • Error – runtime errors that do not require immediate action but should be typically logged.
  • Critical – critical conditions. Example: application component unavailable, unexpected exception.
  • Alert – Example: entire website down, database unavailable, etc.
  • Emergency – system is unusable.

Was this helpful?