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.

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:
    16
    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:
    1
    Hello,

    You can add the log rotate in the file /etc/logrotate.conf .
     
  3. Spiral

    Spiral BANNED

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

Share This Page