The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Archive logs after awstats run

Discussion in 'cPanel Developers' started by _El_Chojin_, Aug 30, 2009.

  1. _El_Chojin_

    _El_Chojin_ Member

    Joined:
    May 22, 2009
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1
    Hi:
    On WHM you can configure that afer stats run, delete domlog of the domain, this is good to dont get out of disk space, the problem is that on my country you need to save access log of apache for some months by law.

    What i would like is to move it to another folder.

    At this time i have a script that copy al logs at midnight, and the problem is that stats only have access log from midnight to the time that is executed so, only few hours, so what i'm trying to do is to move the log after is processed by awstats (i only use this stats program) to another folder, and my scipt could copy after.

    I have opened a ticket with cpanel support but they dont support this things, but said me where i need to start customizing and is:

    /usr/local/cpanel/Cpanel/Logd.pm in function "dologs", around line 424.

    Anyone could help me.

    Thanks.
     
  2. sirdopes

    sirdopes Well-Known Member
    PartnerNOC

    Joined:
    Sep 25, 2007
    Messages:
    141
    Likes Received:
    0
    Trophy Points:
    16
    Cpanel already has an option built in to save the logs. It creates a folder called log or logs in your home directory where it stores the apache domlogs in a compressed file. You can enable this by clicking on raw access logs and then:

    Archive Logs in your home directory at the end of each stats run
     
Loading...
Similar Threads - Archive logs awstats
  1. Ben Trigg
    Replies:
    1
    Views:
    149

Share This Page