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!

How to rotate a custom log?

Discussion in 'General Discussion' started by noimad1, Dec 12, 2006.

  1. noimad1

    noimad1 Well-Known Member

    Joined:
    Mar 27, 2003
    Messages:
    627
    Likes Received:
    0
    Trophy Points:
    166
    I have set it up on one of my servers to log myql queries to a log file in the /var/log directory.

    There is only one site on this server, so I didn't think it would be that bad, but the file grew fairly quickly.

    So is there a way that I can have this log rotated like the messages and exim_mainlog log files are?
     
  2. pravin

    pravin Member

    Joined:
    Jun 8, 2005
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    151
    Hello,

    You can add the log rotate in the file /etc/logrotate.conf .
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    8
    Trophy Points:
    193
    Add your log info to /etc/logrotate.conf
     
Loading...

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