View apache error log in real time

I am creating a PHP application using mod_php in apache. However, during development, I will have syntax errors in the code (of course).

When I load the error page, I get 500 pages, if I want to view the actual error message, I have to go into / var / log and cat in the actual error log. It is very unpleasant to do in development all the time.

I know that errors can appear on a web page, but this is not always convenient when working with JSON, etc., and this will ruin the page.

I know that with most python frames, error messages simply print to stdout when the server application starts, however, in this case, since I just bind PHP to the apache service background process, I don’t see how this would be possible.

Is there a way to view real-time error logs in a window with apache?

+6
source share
2 answers
tail -f /var/log/apache/error.log 
+24
source

In real time use:

 sudo watch tail /var/log/apache2/error.log 
+2
source

Source: https://habr.com/ru/post/945278/


All Articles