I am sorry, but it looks that you completely do not understand or forget that javascript is executed in the browser (on client side) while php is executed on server, before browser receives the page at all.
PHP code inserts the text which was in your log when page was asked from server.
After browser receives it, it only replaces contents with the same text which was statically implanted in the page by php script, may be, minutes, hours or years ago.
It resembles the person who reads again and again some old letter received from the fried long ago - one could not get new information from this old letter.
You need your javascript to perform (by timer) ajax request to server for your log file and insert what you received in response. This may be performed without any PHP (if only log file is accessible not only from the php scripts - otherwise it should be requested from separate php-script).
http://www.w3schools.com/ajax/ajax_example.asp