I was fed up myself with the logs being deleted at 3:00 every day, so I made my own system that makes sure I don't miss anything.
Make all your pages .php instead of .html. Write the html code as usual, like a normal web page, but at the very top of the page, include this.
><?php
############# Change the following 2 lines as needed
$thispage = "yourpage.php";
$basedir = "/home/your_account/public_html/logs";
$ip = $_SERVER["REMOTE_ADDR"];
$referer = $_SERVER["HTTP_REFERER"];
$foo = $_SERVER["HTTP_X_FORWARDED_FOR"];
if ($foo) { $ip = $foo; }
############# Change the following line as needed
$bar = strpos("$referer", "yourdomainname.com");
if ($bar === false) { } else { $referer = ""; }
############# time()-3 will put the logs in west coast time. Change as needed
$filename = date("m-d-y", time()-3*3600);
$localtime = date("g:i A", time()-3*3600);
$foobar = fopen("$basedir/$filename.txt", "a");
if ($foobar) { fwrite($foobar, "$ip\t$localtime\t$thispage\t$referer\n"); }
if ($foobar) { fclose($foobar); }
?>
Every time a page is viewed, it'll write logs into a regular directory on your web site. You can access the logs later anytime from an address like this:
www.yourdomainname.com/logs/03-04-03.txt
You need to create the directory first, so there is a place for the logs to get written into, and you should password-protect the directory so regular users can't see the logs.
Works like a charm.