You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Also note that basic_config will replace all of your handlers with the ClickHandler, so I would first call basic_config and then set up your additional handler.
Only getting unformatted console output when I try this. I'll be happy to submit some updated docs if you can help me through this:D
`import click
import click_log
import logging
logger = logging.getLogger(name)
fh = logging.FileHandler(name + '.log')
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
fh.setFormatter(formatter)
logger.addHandler(fh)
click_log.basic_config(logger)
@click.command()
@click_log.simple_verbosity_option(default='DEBUG', metavar='LEVEL')
@click.option('--execution_mode', default='dry_run', help="mode: [dry_run/install/force]")
def main(execution_mode, phase, load_local_files):
logger.info("beginning with execution mode: " + execution_mode)`
The text was updated successfully, but these errors were encountered: