def addOutputLevel(parser):
    """
    Add options to get more or less messages.
    """
    import logging
    parser.add_option('--verbose', action='store_const', const=logging.INFO,
        dest='log_level', help='print more information')
    parser.add_option('--debug', action='store_const', const=logging.DEBUG,
        dest='log_level', help='print debug messages')
    parser.add_option('--quiet', action='store_const', const=logging.
        WARNING, dest='log_level', help='print only warning messages (default)'
        )
    parser.set_defaults(log_level=logging.WARNING)
    return parser
