[elbe-devel] [PATCH v3 27/52] Add logging to opt.log for command mkcdrom

Torben Hohn torben.hohn at linutronix.de
Mon Jul 8 10:27:50 CEST 2019


On Fri, Jul 05, 2019 at 02:51:29PM +0200, Olivier Dion wrote:
> 
> On 2019-07-05T13:00:06+0200, Torben Hohn wrote:
> 
> > > +    stdout = True
> > > +    if opt.log:
> > > +        stdout = False
> 
> > i would really like this logic to be moved into elbe_logging()
> 
> I agree
> 
> > looking closer, i dont understand, how specifying a logfile and a
> > project dir is distinguished.
> 
> You can't .. you specify a directory.  What I could do on the other hand
> is to provide an optional argument called file=False.  If you want to
> log to only one file instead to a project directory you pass file=True.
> 
> 'None' could be a special sentinel that redirect to stdout, instead of
> doing stdout=True.
> 
> Thus:
> 
> elbe_logging(None) -> stdout
> elbe_logging(projectdir) -> projectdir/*.txt
> elbe_logging(logfile, file=True) -> logfile
> 
> I would have to rebase some commits tho

whats with the Queue object ?
i thought, that was the project dir thingy ?

> 
> --
> Olivier Dion
> Linutronix GmbH | Bahnhofstrasse 3 | D-88690 Uhldingen-Mühlhofen

-- 
Torben Hohn
Linutronix GmbH | Bahnhofstrasse 3 | D-88690 Uhldingen-Mühlhofen
Phone: +49 7556 25 999 18; Fax.: +49 7556 25 999 99

Hinweise zum Datenschutz finden Sie hier (Informations on data privacy 
can be found here): https://linutronix.de/kontakt/Datenschutz.php

Linutronix GmbH | Firmensitz (Registered Office): Uhldingen-Mühlhofen | 
Registergericht (Registration Court): Amtsgericht Freiburg i.Br., HRB700 
806 | Geschäftsführer (Managing Directors): Heinz Egger, Thomas Gleixner



More information about the elbe-devel mailing list