LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-13-2011, 12:16 PM   #1
bluegospel
Member
 
Registered: Jan 2010
Distribution: centOS
Posts: 404

Rep: Reputation: 53
restore error_log


Hi, I'm running CentOS 5.5 & Apache. In the past when I would run scripts (in Perl), whenever they would generate errors, they would be written to a file called "error_log". I believe that once the file reached a size-limit, the file would be renamed error_log.1, error_log.2, etc. and a new file would be created called error_log, to which errors would be written. Well, the script I'm working on now went crazy and wrote GBs of data to the text file so it couldn't be opened. When I moved the active file to trash and ran the script again it continued to write to the file in trash so I deleted it permanently. But now when my scripts produce errors, either they're not written anywhere or at least I can't find them. How do I restore the error log & normal behavior? Thanks!
 
Old 05-13-2011, 01:18 PM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 613Reputation: 613Reputation: 613Reputation: 613Reputation: 613Reputation: 613
restart Apache. The file descriptor it is using is still pointing at the file you deleted. restarting Apache will make it create & open error_log in the old place.
 
1 members found this post helpful.
Old 05-13-2011, 03:45 PM   #3
bluegospel
Member
 
Registered: Jan 2010
Distribution: centOS
Posts: 404

Original Poster
Rep: Reputation: 53
Thanks, you made that very easy.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Question on error_log fabi_aldana Linux - Server 1 05-03-2010 05:48 AM
about httpd/error_log soroccoheaven Linux - Server 3 09-24-2007 12:54 AM
apache error_log always full Suinatsa Linux - Software 1 07-21-2006 04:44 AM
Apache error_log Sapient Linux - Software 1 12-31-2005 09:10 PM
My Error_log message ecroswell Linux - General 1 03-14-2003 06:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:18 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration