Initial commit
This commit is contained in:
commit
f9ba5a3cfd
14 changed files with 889 additions and 0 deletions
23
logger.py
Normal file
23
logger.py
Normal file
|
@ -0,0 +1,23 @@
|
|||
import click
|
||||
import logging
|
||||
import sys
|
||||
|
||||
|
||||
def setup_logging(verbose: bool):
|
||||
level = logging.INFO
|
||||
if verbose:
|
||||
level = logging.DEBUG
|
||||
logging.basicConfig(
|
||||
stream=sys.stdout,
|
||||
format='%(asctime)s %(levelname)s: %(message)s',
|
||||
datefmt='%m/%d/%Y %H:%M:%S',
|
||||
level=level
|
||||
)
|
||||
|
||||
|
||||
verbose_option = click.option(
|
||||
'-v',
|
||||
'--verbose',
|
||||
is_flag=True,
|
||||
help='Enables verbose logging'
|
||||
)
|
Loading…
Add table
Add a link
Reference in a new issue