Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#16 constantly changing log file name

closed
None
5
2012-10-11
2000-11-28
Anonymous
No

Discussion

  • Logged In: NO
    Browser: Mozilla/4.0 (compatible; MSIE 4.01; Windows 98)

    Hi,

    Have installed Awstats on my (hosted)Apache web server.
    No problems with the log file format, but the problem
    is that a new log file is produced each day, and the
    log file name includes the date (e.g.
    access.20001127). No cumulative log file is available.
    How can I configure the awstats.pl script to use a
    changing file name, i.e. to select the latest log file
    each day.

    If I just specify the file name for one particular
    day, things work fine, but I do not want to manually
    change the awstats.pl file every day!

    Any help much appreciated.

    Norbert Payne
    norbert@image.dk

     
  • Logged In: YES
    user_id=96898
    Browser: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)

    I have no "good" solution for the moment but you can try
    this:
    First download 2.23 version and the change the following
    line:

    $OpenFileError=1;if (open(LOG,"$LogFile")) {
    $OpenFileError=0; }

    into

    $OpenFileError=1;if (open
    (LOG,"$LogFile.$nowyear$nowmonth$nowday")) {
    $OpenFileError=0; }

    I think it should work but i can't promise.