LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 02-02-2009, 10:15 AM   #1
Udi
Member
 
Registered: Jan 2009
Posts: 165

Rep: Reputation: 44
I need a little help with logrotate


Hi

I am trying a very basic usage of logrotate:
1) I create a basic configuration file called /etc/qalogrotate
2) I call logrotate on the command line with "/etc/qalogrotate" as the parameter

=> The log file moves to the log directory but the original file is deleted. This is a problem because the daemon which is logging to the file won't handle the disappearance of the log file, and no further logging will be made.

The way I expect it to work is, that the daemon won't even notice that the file was rotated, and will continue to log to the file as usual (only that now the file should be blank). That's the whole purpose of existence of logrotate, no? Why does it delete the original log file and ruin future logging? Any solution/workaround will be appreciated.

b.t.w - this is the /etc/qalogrotate file I made:
/var/log/mylog/daemon.log {
missingok
olddir qalogrotate
nocreate
nocompress
}

Thanks in advance.
Udi.
 
Old 02-02-2009, 11:01 AM   #2
openSauce
Member
 
Registered: Oct 2007
Distribution: Fedora, openSUSE
Posts: 252

Rep: Reputation: 39
If you look at the man page for logrotate, you'll see the nocreate option tells it not to create the new log file. Try taking that out of your config file.
 
  


Reply



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
logrotate Ronin_tekorei Linux - Newbie 2 02-07-2008 05:44 AM
Why we use logrotate ? shipon_97 Linux - Newbie 4 01-09-2008 09:15 AM
Logrotate Help! MaverickApollo Linux - Software 3 02-19-2004 12:09 PM
logrotate dominant Linux - Newbie 1 02-13-2004 09:28 AM
logrotate Rig24 Linux - Newbie 2 07-11-2003 05:08 AM

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

All times are GMT -5. The time now is 06:46 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
Open Source Consulting | Domain Registration