Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 258839 - Emerge doesn't log to syslog
Summary: Emerge doesn't log to syslog
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - External Interaction (show other bugs)
Hardware: All Linux
: High normal with 2 votes (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-13 13:32 UTC by Hari Sekhon
Modified: 2012-04-18 01:18 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hari Sekhon 2009-02-13 13:32:16 UTC
Make emerge log to syslog.

Very important for auditing, affects security if people go around installing things without syslog capturing it (local logs are insufficient for centralized alerting). PORTAGE_ELOG_SYSTEM is not emerge logging.

See yum for a proper example of how this should be done.
Comment 1 Hari Sekhon 2009-02-13 13:34:37 UTC
There was a bug about 4-5 years back on this, the result of which was the dev couldn't be bothered to make this right.

Please do not mark this as a duplicate. That bug was closed for the wrong reasons.

In this day and age it's an absolutely terrible practice to not log everything to syslog.
Comment 2 Ron Gemeinhardt (RETIRED) gentoo-dev 2009-02-13 20:16:04 UTC
With syslog-ng it's trivial to integrate emerge.log with the system log:

---- /etc/syslog-ng/syslog-ng.conf
  source emerge { file("/var/log/emerge.log"); };
  ...
  log { source(emerge);
        filter(...whatever...);
        destination(...whatever...);
  };
--------

Granted, some loggers may lack this capability, but choosing a suitable logger seems more apropos than adding syslog integration to Portage.  Not everyone wants or needs that.
Comment 3 Hari Sekhon 2009-02-16 09:16:46 UTC
This is a workaround that shouldn't be necessary.

So, we are to maintain separate logging configurations for Gentoo distribution systems to make up for a very obvious deficiency in portage logging?

It is more correct and appropriate for applications to log correctly that to start making workarounds here and there which soon add up and lead to more difficult maintenance as things become more and more disparate.

I'd prefer to see more standardization than tacked on workarounds.
Comment 4 Alec Warner (RETIRED) archtester gentoo-dev Security 2009-02-16 23:08:09 UTC
> This is a workaround that shouldn't be necessary.
>
> So, we are to maintain separate logging configurations for Gentoo distribution
> systems to make up for a very obvious deficiency in portage logging?

I wouldn't call it obvious or a deficiency.

>
> It is more correct and appropriate for applications to log correctly that to
> start making workarounds here and there which soon add up and lead to more
> difficult maintenance as things become more and more disparate.

I don't think you can really agree on what 'logging correctly' means.  That being said I got bored today and wrote a patch for this; so expect it soon.

-A
Comment 5 Zac Medico gentoo-dev 2009-06-05 02:08:31 UTC
We can add support for FEATURES=syslog or maybe an emerge --syslog option that you can add to EMERGE_DEFAULT_OPTS.
Comment 6 Sergey S. Starikoff 2009-06-30 05:47:22 UTC
(In reply to comment #5)
> We can add support for FEATURES=syslog or maybe an emerge --syslog option that
> you can add to EMERGE_DEFAULT_OPTS.
> 

I think, it will be better to return oprability of 'syslog' option of 'PORTAGE_ELOG_SYSTEM' parmetr in /etc/make.conf.
Comment 7 Vjaceslavs Klimovs 2012-04-17 19:58:25 UTC
Ping? Portage should be able to log to syslog, this is standard practice on *nix systems.
Comment 8 Zac Medico gentoo-dev 2012-04-18 01:18:54 UTC
(In reply to comment #6)
> I think, it will be better to return oprability of 'syslog' option of
> 'PORTAGE_ELOG_SYSTEM' parmetr in /etc/make.conf.

That should be working now. I tested it myself when I fixed bug 390965.

(In reply to comment #7)
> Ping? Portage should be able to log to syslog, this is standard practice on
> *nix systems.

If you'd like to submit a patch, you can use the code from /usr/lib/portage/pym/pym/portage/elog/mod_syslog.py for example. I would make it conditional on FEATURES=syslog.