Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 8 of 8
  1. #1
    Registered User
    Join Date
    Oct 2009
    Posts
    3

    Default How to clear the Error Log?

    Hi,

    So how can I clear the error log?

    Thanks.

  2. #2
    Member
    Join Date
    May 2008
    Posts
    1,114

    Default

    Using the below mentioned URL, you can easily rotate your logs as needed.

    www.logview.org

  3. #3
    Registered User
    Join Date
    Oct 2009
    Posts
    3

    Default

    Quote Originally Posted by thewebhosting View Post
    Using the below mentioned URL, you can easily rotate your logs as needed.

    www.logview.org
    Hi, thanks for the link but isn't there a way to just clear the log with a simple command or something from SSH (I have root access)?

    I just hate to install a whole new script just to clear the log as my server resources are already taxed as it is.

  4. #4

  5. #5
    Member
    Join Date
    Jul 2006
    Posts
    90

    Default

    Quote Originally Posted by JackieServer View Post
    Hi,

    So how can I clear the error log?

    Thanks.
    This way:
    shell# > /path/to/the/error_log

  6. #6
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    10,720
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by JackieServer View Post
    Hi,

    So how can I clear the error log?

    Thanks.
    I recommend determining what is causing the error log to fill up so that clearing the log doesn't become part of your regular server maintenance. Such an investigation may assist with secondary issues you may not be currently aware of.

  7. #7
    Member linux7802's Avatar
    Join Date
    Dec 2007
    Posts
    218
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by JackieServer View Post
    Hi, thanks for the link but isn't there a way to just clear the log with a simple command or something from SSH (I have root access)?

    I just hate to install a whole new script just to clear the log as my server resources are already taxed as it is.
    As you mentioned you are having error logs problem on your server.In that case I would like to recommend you please check the error logs and found out the exact error message which causing the such heavy error logs problem and correct the files which consuming error logs in daily basis so that there is no need to empty error logs file.
    Regards,
    G R Sonar
    cPanel Hosting Blog

  8. #8
    Member
    Join Date
    Apr 2009
    Posts
    230

    Default

    Or atleast, make a tarball of the recent logs before just emptying it !

Similar Threads & Tags
Similar threads

  1. Splitting Apache Error Log Into Error Types
    By chips12 in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 06-29-2011, 04:02 AM
  2. clear apache error log
    By Gaming-Heaven in forum New User Questions
    Replies: 3
    Last Post: 05-04-2007, 10:37 PM
  3. are users able to clear error log?
    By ALL in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 12-05-2005, 10:17 PM
  4. Clear log files
    By crodenberg in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 01-23-2005, 09:52 PM
  5. how to clear error logs
    By Argious in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 12-03-2003, 04:32 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube