How to see error log file for php 7.4 in Magento 2 project which is working ubuntu. or how to set new log file location.

4 Answers 4


The following logs have a common location for all Magento projects:

Deployment log: var/log/cloud.log

Last deployment error log: var/log/cloud.error.log

Debug log: var/log/debug.log

Exception log: var/log/exception.log

System log: var/log/system.log

Support log: var/log/support_report.log

Reports: var/report/

All errors (and other notices) are logged in files under var/log in the root of your Magento project. There you can find your error logs

  • But I'm not finding php error log file under magento 2 under var/log dir.
    – NoOn
    Commented Jul 20, 2022 at 7:23
  • There are no php error log files in Magento. All the log files that exist in Magento are described by @divyarajsinh-barad in his answer. Commented Jul 20, 2022 at 8:23
  • And how about ubuntu log file for php errors?
    – NoOn
    Commented Jul 20, 2022 at 8:27
  • 1
    Try this askubuntu.com/questions/14763/… Commented Jul 20, 2022 at 8:56
  • 1
    sudo tail /var/log/nginx/error.log -n 200 will give you the last 200 logs. Change the number to get more or less. Commented Jul 20, 2022 at 9:01

It is version dependent :

  1. /var/log/nginx/error.log Or
  2. /usr/local/var/log/nginx/* Or
  3. /usr/local/nginx/logs/*
  • You can also check your nginx.conf Commented Jul 20, 2022 at 9:08

You can also check your nginx.conf

"run nginx -t" command  to locate your nginx.conf.

In your ngingx.conf file :

    error_log  /usr/local/var/log/nginx/error.log;
    error_log  /usr/local/var/log/nginx/error.log  notice;
    error_log  /usr/local/var/log/nginx/error.log  info;

here you can see the logs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.