Re: [gentoo-user] New elog functionality Log rotation?

2006-06-18 Thread Mick

On 17/06/06, Teresa and Dale [EMAIL PROTECTED] wrote:

Richard Broersma Jr wrote:

I was wondering if anyone could point me to the conf file to turn on log 
rotation for my
emerge.log.



Here is a sample of the file:

 /var/log/http-replicator.log {
 size 10k
 missingok
 copytruncate
 compress
 }


That is for http-replicator and the file is named the same.  I guess the
name doesn't matter really.


Well, the name has to reflect *exactly* the path and file  you intend to rotate.


I'm not sure but I think you need a cron job to run it to.  Not real sure.


There's two entries in logrotate.conf, a generic one:
==
# rotate log files weekly
#monthly
weekly
#daily
==

and a per file one, e.g.:
==
# when /var/log/user.log gets big
/var/log/user.log
{
   rotate 1
   monthly
   size=1M
}
==

Now, if you add logrotate in you /etc/make.conf it will be taken into
account when new apps are created and relevant files and entries will
be added in /etc/logrotate.d by those apps that are logrotate aware.
This is from mine:
==
# ls -la /etc/logrotate.d
total 21
drwxr-xr-x  2 root root  184 Jun  4 12:37 .
drwxr-xr-x 73 root root 5144 Jun 18 10:38 ..
-rw-r--r--  1 root root0 Jan 21 02:33 .keep
-rw-r--r--  1 root root  145 Feb 14 19:59 acpid
-rw-r--r--  1 root root   79 May  6 12:13 hibernate-script
-rw-r-  1 root root  191 Mar  2 20:26 privoxy
-rw-r--r--  1 root root  342 Jan 22 20:21 syslog-ng
==

Of course, if there is a file created for an application in
/etc/logrotate.d there's no need for a manual entry in
/etc/logrotate.conf as it will be a duplicate and lead to errors which
will invariably appear in /root/dead.letter.

HTH.
--
Regards,
Mick
--
gentoo-user@gentoo.org mailing list



[gentoo-user] New elog functionality Log rotation?

2006-06-17 Thread Richard Broersma Jr
I was wondering if anyone could point me to the conf file to turn on log 
rotation for my
emerge.log.

Regards,

Richard Broersma Jr.
-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] New elog functionality Log rotation?

2006-06-17 Thread Teresa and Dale
Richard Broersma Jr wrote:

I was wondering if anyone could point me to the conf file to turn on log 
rotation for my
emerge.log.

Regards,

Richard Broersma Jr.
  


I use logrotate and it is here.

/etc/logrotate.d

Here is a sample of the file:

 /var/log/http-replicator.log {
 size 10k
 missingok
 copytruncate
 compress
 }


That is for http-replicator and the file is named the same.  I guess the
name doesn't matter really.

I'm not sure but I think you need a cron job to run it to.  Not real sure.

Hope that helps.

Dale
:-)
-- 
gentoo-user@gentoo.org mailing list