Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Keep log files for month setting misleading

Discussion in 'General Discussion' started by MarlboroMan, Oct 6, 2006.

  1. MarlboroMan

    MarlboroMan Well-Known Member

    Dec 7, 2001
    Likes Received:
    Trophy Points:
    Noticed this on a couple of boxes. The one in this example is running 10.9.0-STABLE_38.

    Logs are being truncated daily. Traced it down to the "Keep log files at the end of the month (default is off as you can run out of disk space quickly)" setting in WHM, which controls "keeplogs" in the /var/cpanel/cpanel.config file.

    Looking at /usr/local/cpanel/cpanellogd, it appears that if keeplogs is not set, logs are truncated every time they are processed (every day, in this case), not kept for a month:

    (In dologs(), which is ran against each user every "cycle" days):

          if ( ! $CPCONF{'keeplogs'} ) {
             foreach my $log (keys %LOGS) {
                if (-f $log && $log !~ /^[\s\t\r\n]+$/) { resetfile($log); }
    sub resetfile {
       my $file = shift;
    Is this as intended? If so, the WHM setting is misleading, as it implies that if not checked, logs will be kept for a month, instead of truncated daily.
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice