public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Mick <michaelkintzios@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] "New elog functionality" Log rotation?
Date: Sun, 18 Jun 2006 09:41:01 +0000	[thread overview]
Message-ID: <358eca8f0606180241q7995973kb83fae049d337930@mail.gmail.com> (raw)
In-Reply-To: <44948AFF.9060200@vista-express.com>

On 17/06/06, Teresa and Dale <teendale@vista-express.com> 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 root    0 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



      reply	other threads:[~2006-06-18  9:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-17 22:14 [gentoo-user] "New elog functionality" Log rotation? Richard Broersma Jr
2006-06-17 23:06 ` Teresa and Dale
2006-06-18  9:41   ` Mick [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=358eca8f0606180241q7995973kb83fae049d337930@mail.gmail.com \
    --to=michaelkintzios@gmail.com \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox