31 lines
942 B
Python
31 lines
942 B
Python
|
#!/usr/bin/env python3
|
||
|
"""
|
||
|
Project - Application Title
|
||
|
|
||
|
TODO: Add a short explanation of the application here.
|
||
|
"""
|
||
|
|
||
|
import argparse
|
||
|
import logging
|
||
|
|
||
|
|
||
|
if __name__ == "__main__":
|
||
|
log_format = '%(asctime)s %(levelname)s:%(name)s: %(message)s'
|
||
|
log_datefmt = '%Y-%m-%dT%H:%M:%S%z'
|
||
|
logging.basicConfig(format=log_format, datefmt=log_datefmt, level=logging.INFO)
|
||
|
logger = logging.getLogger()
|
||
|
|
||
|
parser = argparse.ArgumentParser(description='TODO Program Title')
|
||
|
parser.add_argument('-n', '--dryrun', action='store_true',
|
||
|
help='do not connect to the FMU')
|
||
|
parser.add_argument("-v", "--verbosity", action="count",
|
||
|
help="increase output and logging verbosity")
|
||
|
args = parser.parse_args()
|
||
|
|
||
|
if args.verbosity == 2:
|
||
|
logger.setLevel(logging.DEBUG)
|
||
|
elif args.verbosity == 1:
|
||
|
logger.setLevel(logging.INFO)
|
||
|
else:
|
||
|
logger.setLevel(logging.WARNING)
|