import click


def add_logging_options(func):
    """Add log_file and verbose options."""
    add_log_file = click.option(
        "--log-file",
        "-l",
        type=click.Path(dir_okay=False),
        default="./centralpy.log",
        show_default=True,
        help="Where to save logs.",
    )
    add_verbose = click.option(
        "--verbose",
        "-v",
        is_flag=True,
        help="Display logging messages to console. This cannot be enabled from a config file.",
    )
    return add_log_file(add_verbose(func))