cancel
Showing results for 
Search instead for 
Did you mean: 

Displaying Images and Error Logging

   Did you know you can see the translated content as per your choice?

Translation is in progress. Please check again after few minutes.

Displaying Images and Error Logging

I have images that are giving me 404 errors. I verified that the image existed and that the path was correct. I tried several different permissions and ownerships but nothing has seemed to work. I don't have an error.log file to check for a more in depth error message. Does anyone know how to fix this issue? Or how to enable error logging in 2.1?

1 REPLY 1

Re: Displaying Images and Error Logging

Create a log file 'mylog.log' inside var/log/ and place this code inside your function

     

    $writer = new \Zend\Log\Writer\Stream(BP . '/var/log/mylog.log');
    $logger = new \Zend\Log\Logger();
    $logger->addWriter($writer);
    $logger->info("Here your cmment");