Standard output (messages) writing is currently used inconsistently (for example, sometimes using sys.write(), others with print() ).
The user provides a string with these tags (e.g. "isr" for everything except warnings) and logging is only done for those in the string. Critical level messages are always printed, unless there's a good reason not to.
if "l" in options.verbosity:
FORMAT = '[%(filename)s:%(lineno)s - %(funcName)20s() ] %(asctime)15s - %(levelname)s : %(message)s'
else:
FORMAT = '%(asctime)15s - %(levelname)s : %(message)s'
logging.basicConfig(format=FORMAT)
logger = logging.getLogger(__name__)
if` "w" in options.verbosity:
logger.warning("The warning message")
This change should not be made for standalone scripts, this is only for motifgp.py and its classes.