On Sat, 2009-08-22 at 10:39 +0200, Jarry wrote:
> Hi,
> I have a log-server (syslog-ng) collecting logs from my servers.
> Everything works for standard logs: clients forward them to server
> where they are filtered (based on facility or application) and
> splitted into a few files (for each client).
> 
> The problem is with portage logs: I can not find any pattern
> I could use to filter them out. For example, this is small part
> of /var/log/emerge.log:
> 
> 1250923552:  *** emerge  sync
> 1250923552:  === sync
> 1250923552: >>> Starting rsync with rsync://140.211.166.165/gentoo-portage
> 1250923665: === Sync completed with rsync://140.211.166.165/gentoo-portage
> 1250923666:  *** terminating.
> 1250923760: Started emerge on: Aug 22, 2009 06:49:20
> 1250923760:  *** emerge  depclean
> 1250923760:  >>> depclean
> ...
> 
> Can I somehow force portage to write all its logs (summary.log,
> emerge-fetch.log, emerge.log) in standard syslog format RFC-3164?
> I mean with all that stuff like priority (facility), header
> (timestamp, hostname), application, etc. Even better if portage
> could write its logs to /dev/log...

Portage doesn't use syslog format (that's why it doesn't log to
syslog ;)

There is the portrage elog system but's kinda a misnomer (maybe should
be called portage message system).  You can change
PORTAGE_ELOG_SYSTEM="syslog" but it won't do what you are expecting.

I'm not sure what you are trying to "filter out".  Portage logs are
relatively machine-readable (e.g. qlop).

If you don't mind getting your hands dirty, portage is written mostly in
python and bash so it shouldn't be that difficult to dig into the parts
that handle emerge.log and emerge-fetch.log and convert them to syslog.

-a



Reply via email to