[elbe-devel] [PATCH v3 27/52] Add logging to opt.log for command mkcdrom
Olivier Dion
dion at linutronix.de
Fri Jul 5 14:51:29 CEST 2019
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
--
Olivier Dion
Linutronix GmbH | Bahnhofstrasse 3 | D-88690 Uhldingen-Mühlhofen
More information about the elbe-devel
mailing list