LGTM, thanks On Tue, 12 Jan 2016 at 16:00 'Klaus Aehlig' via ganeti-devel < [email protected]> wrote:
> Add a utility function that provides feedback to the > user on stdout that is additionally logged (at INFO level) > in the log file. > > Signed-off-by: Klaus Aehlig <[email protected]> > --- > lib/cli.py | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/lib/cli.py b/lib/cli.py > index c9ab93d..e9859f8 100644 > --- a/lib/cli.py > +++ b/lib/cli.py > @@ -3826,6 +3826,12 @@ def ToStdout(txt, *args): > _ToStream(sys.stdout, txt, *args) > > > +def ToStdoutAndLoginfo(txt, *args): > + """Write a message to stdout and additionally log it at INFO level""" > + ToStdout(txt, *args) > + logging.info(txt, *args) > + > + > def ToStderr(txt, *args): > """Write a message to stderr only, bypassing the logging system > > -- > 2.6.0.rc2.230.g3dd15c0 > > -- Helga Velroyen Software Engineer [email protected] Google Germany GmbH Erika-Mann-Strasse 33 80636 München Geschäftsführer: Matthew Scott Sucherman, Paul Terence Manicle Registergericht und -nummer: Hamburg, HRB 86891 Sitz der Gesellschaft: Hamburg Diese E-Mail ist vertraulich. Wenn Sie nicht der richtige Adressat sind, leiten Sie diese bitte nicht weiter, informieren Sie den Absender und löschen Sie die E-Mail und alle Anhänge. Vielen Dank. This e-mail is confidential. If you are not the right addressee please do not forward it, please inform the sender, and please erase this e-mail including any attachments. Thanks.
