> On Jan. 27, 2014, 5:37 p.m., Aurélien Gâteau wrote: > > Looks good, but I would suggest using Python logging module instead of > > writing our own. Basic usage should be as simple as: > > > > # setup > > import logging > > > > ... parse args... > > > > if args.quiet: > > minlevel = logging.WARNING > > else: > > minlevel = logging.INFO > > > > logging.basicConfig(level=minlevel, format='%(asctime)s:%(levelname)s: > > %(message)s') > > > > # then use it like this > > logging.info("Foo") > > logging.error("Something went wrong!")
Ah, I should probably have guessed that Python would have something like that built-in :-) - Alex ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/115332/#review48402 ----------------------------------------------------------- On Jan. 27, 2014, 4:25 p.m., Alex Merry wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://git.reviewboard.kde.org/r/115332/ > ----------------------------------------------------------- > > (Updated Jan. 27, 2014, 4:25 p.m.) > > > Review request for KDE Frameworks and Aurélien Gâteau. > > > Repository: kapidox > > > Description > ------- > > Add a --quiet option > > > Diffs > ----- > > src/kgenapidox eadd3a77b42b92df882456fa25c20339d4394708 > src/kapidox/__init__.py c89e06fdc2385f07b074b14574c1e62900723cab > src/kgenframeworksapidox f565eb36fb0dc952643ff174001c5ee6f96cd394 > > Diff: https://git.reviewboard.kde.org/r/115332/diff/ > > > Testing > ------- > > Built some dox (Python 2.7, I think). > > > Thanks, > > Alex Merry > >
_______________________________________________ Kde-frameworks-devel mailing list Kde-frameworks-devel@kde.org https://mail.kde.org/mailman/listinfo/kde-frameworks-devel