def add_log_parser_arguments(parser):
    """Add log arguments to command line parser.

    Defines the following command line arguments:
    --log: path to log file (if any)
    -v: verbosity level. More => more verbose log messages.

    Args:
        parser (argparse.ArgumentParser): parser to add arguments to.

    Returns:
        parser (argparse.ArgumentParser): parser with log arguments added.
    """
    parser.add_argument(
        '--log',
        nargs='?',
        default=None,
        help='Path to log file.'
    )
    parser.add_argument(
        '-v',
        action='count',
        default=0,
        help='Verbosity of log messages.'
    )

    return parser