Go Job Hunting at the LQ Job Marketplace
Go Back > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Slackware This Forum is for the discussion of Slackware Linux.


LinkBack Search this Thread
Old 10-02-2003, 02:37 PM   #1
Registered: Sep 2003
Location: Milano, Italy
Distribution: Slackware
Posts: 56

Rep: Reputation: 15
How to add my log files in logrotate

Hi all.
I've a little problem.
I would add my log file (generated by an application) in logrotate, so it doesn't become too big. I've just read man pages of logrotate and I've seen a lot of posts and web pages, but nobody is telling about to add new files in logrotate.

May someone help me?
Thanks a lot
Old 10-03-2003, 06:55 AM   #2
Registered: Oct 2003
Location: Germany
Distribution: Slackware 10.2, SuSE 10.0, Solaris(SPARC) 9+Solaris(x86) 9, NetBSD(sparc) 2.0.2
Posts: 43

Rep: Reputation: 15

adding your file to logrotate is quite simple. If you know where to look. ;-)

The anwer is /etc/logrotate.d/syslog

In Slackware 9.1 simply add your logfile e.g. /var/log/mylog to the first line containing all the other logfiles:

/var/log/cron /var/log/debug /var/log/maillog /var/log/messages /var/log/secure /var/log/spooler /var/log/syslog /var/log/mylog {
/bin/kill -HUP `cat /var/run/ 2>/dev/null` 2>/dev/null || true

This should do it, though I've not seen it work, because the machine's waiting for Postfix to be installed. 8-)

In Slackware 8.1 you had to add a complete set of 5 lines for every logfile:

/var/log/mylog {
/bin/kill -HUP `cat /var/run/ 2> /dev/null` 2> /dev/null || true

This worked fine for a long time.

Happy slacking

Old 10-03-2003, 08:16 AM   #3
Registered: Sep 2003
Location: Milano, Italy
Distribution: Slackware
Posts: 56

Original Poster
Rep: Reputation: 15
Thanks. I'll try it!



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
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
finding considered log name during logrotate Matt Collier Linux - Software 1 10-03-2005 07:51 AM
Deleted /var/log/messages, can't log any files-iptables chingyenccy Linux - Newbie 7 02-27-2005 04:03 PM
logrotate log files - keeping in order when using grep or cat and bash dmellem Linux - Software 6 02-11-2005 01:05 PM
logrotate mishandles files with YYYY-MM-DD extension dthacker Linux - General 0 08-20-2004 09:53 AM
Can log files be time stamped? (such as FTP login and transfer log files) bripage Linux - Networking 6 08-08-2002 10:55 PM

All times are GMT -5. The time now is 11:28 AM.

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