Skip to content

Instantly share code, notes, and snippets.

@markusdr
Created July 22, 2021 17:10
Show Gist options
  • Save markusdr/c400c2e7d8bc59dd3f1ce6a26d9a3b3c to your computer and use it in GitHub Desktop.
Save markusdr/c400c2e7d8bc59dd3f1ce6a26d9a3b3c to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import click
import logging
import click_log
logger = logging.getLogger(__name__)
click_log.basic_config(logger)
@click.command()
@click_log.simple_verbosity_option(logger)
@click.option('-n', '--number', default='config', help='Example number option')
def run(number):
logger.info('info example')
logger.error('error example')
logger.debug('debug example')
print("Number is {}".format(number))
if __name__ == '__main__':
run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment