astroPDR/PMAP — pull request #1 by albireox (2013-04-16 05:05:36+00:00)
Title: Use logger

I have written a logger class in fancyPrint.py. An instance is created at the beginning of the pipeline. For the sake of uniformity it would be nice if we both use it. It's easy to use. To write something both to the log and the stdout write

logger.write('text')

If the argument newLine=True is passed, a line is inserted before the text. If you only want print to the stdout write

doLog=False

and to print only to the log

doPrint=False

The class understand the verbose option passed in the command line. So, if verbose=False, no text will be printed to the stdout except if you pass the option

overrideVerbose=True