def log_parser(parser):
    """ Given a parser, add the options controlling log. """
    group = parser.add_argument_group('logging options')
    group.add_argument('-v', '--verbose', dest='verbose', action=
        'store_true', help='Output debug messages')
    group.add_argument('--quiet', '-q', dest='quiet', action='store_true',
        help='Only output error messages')
    group.add_argument('--time-stamp', dest='timestamp', action=
        'store_true', help='Add timestamps before each log message')
    group.add_argument('--color', choices=['always', 'never', 'auto'], help
        ="Colorize output, defaults to 'auto'")
    group.add_argument('--title', choices=['always', 'never', 'auto'], help
        ="Update terminal title, defaults to 'auto'")
    parser.set_defaults(verbose=False, quiet=False, color='auto', title='auto')
