Ticket #585 (closed enhancement: fixed)

Opened 12 years ago

Last modified 9 years ago

Configurable logging for Paludis

Reported by: Philantrop Owned by:
Priority: Sometime Milestone:
Component: clients/paludis Version: scm
Keywords: Cc:
Blocked By: Blocking:
Distribution: N/A

Description

Here's a quick overview of what I'd like to see with respect to logging:

  • Pluggable logging system with standard plugins (combinable) for
    • storing logs as-is in a configurable location, optionally with per-category subdirs, e. g. /var/log/paludis/sys-apps/coreutils-6.11:20080421-180931.log
    • mailing logs
    • pre-processing logs with a user-specified tool, letting it handle the rest, e. g. '| <programm to process it' '> /var/log/paludis/<some variables to define log name>'
    • being able to save logs as e. g. ${CATEGORY}--${PN}--$(utime).log, etc.
  • Filtering by classes (e. g. debug, elog, ewarn, eerror, etc.)
  • Filtering by phases (e. g. src_unpack, src_prepare, etc.)
  • Filtering by regexps
  • Log with or without colours (configurable)
  • Default: Log everything, write it to a configurable location

Change History

comment:1 Changed 12 years ago by dleverton

Ideally, this should be able to handle all the various kinds of output Paludis produces: ebuild output, merger output, hook output, log messages, etc. Integrating elog handling in the same framework might also be nice.

comment:2 Changed 12 years ago by prak

Integrating with elog would also fix Ticket #574.

comment:3 follow-up: ↓ 4 Changed 12 years ago by ciaranm

We should probably discuss how we'll do parallel build and parallel fetch here. What should Paludis show when doing parallel operations?

Should it show all the outputs in a big mess?

Should it show all the outputs, using output_wrapper to get prefixes?

Should it just show a summary of what it's doing, and not even try to display progress as it happens? Something like

    Current workers:
        [1] install:     cat/pkg-1.23::blah -> other
            started:     20080601 22:07:00
            output:      /var/log/paludis/1234567890-cat---pkg---1.23---blah.install.all.txt
            messages:    /var/log/paludis/1234567890-cat---pkg---1.23---blah.install.messages.txt

        [2] fetch:       cat/foo-2.34::blah
            started:     20080601 22:08:01
            output:      /var/log/paludis/1234567987-cat---foo---2.34---blah.fetch.all.txt
            messages:    /var/log/paludis/1234567987-cat---foo---2.34---blah.fetch.messages.txt

comment:4 in reply to: ↑ 3 Changed 12 years ago by dleverton

Replying to ciaranm:

We should probably discuss how we'll do parallel build and parallel fetch here. What should Paludis show when doing parallel operations?

Assuming you mean the normal command-line client,

Should it just show a summary of what it's doing, and not even try to display progress as it happens?

is probably the least horrible, with detailed output in one-file per job (or at least the ability to do that, probably on by default). But the internals should be flexible enough so that, for example, a GUI client can show each job in a seperate tab.

comment:5 Changed 11 years ago by ciaranm

I think we need to do something like this:

  • Make actions, syncs etc take an sptr to OutputHandler, which is abstract.
  • Make a number of OutputHandler subclasses, such as ToFileHandler, ToScreenHandler, StatusHandler, and connect them together using ToMultipleHandler and FilteringHandler.
  • Let the user glue them together somehow.

We'll probably allow plugins and Python/Ruby? subclassing for handlers for good measure.

comment:6 Changed 11 years ago by ciaranm

  • Blocking set to 714

comment:7 Changed 11 years ago by ciaranm

Ok, with c954a40d23 the framework's there, but not documented. We'll have a play with that for a while, and see if we need to make any big changes before we tell people how to use it.

comment:8 Changed 11 years ago by ciaranm

  • Blocking changed from 714 to 731

0.36 can be our trial run with it not documented or user customisable. We'll move the fancy stuff to 0.38, once we've had some more experience with the basics.

comment:9 Changed 9 years ago by ciaranm

  • Blocking 731 deleted

comment:10 Changed 9 years ago by ciaranm

  • Status changed from new to closed
  • Resolution set to fixed

CommandOutputManager? should let you do all of that.

Note: See TracTickets for help on using tickets.