add logging setting

This commit is contained in:
Patrick Moessler 2023-06-13 10:40:54 +02:00
parent 6fa7277813
commit cd35ccdff4

View file

@ -304,12 +304,15 @@ if __name__ == "__main__":
"-t", "--token", required=True, help="MS Teams client API token file"
)
parser.add_argument("-p", "--port", required=True, help="Serial port")
parser.add_argument(
"--log",
choices=["CRITICAL", "ERROR", "WARNING", "INFO", "DEBUG", "NOTSET"],
default="WARNING",
help="Logging level",
)
args = parser.parse_args()
with open(args.token) as tf:
token = tf.read().strip()
asyncio.run(amain())
# loop = asyncio.new_event_loop()
# asyncio.set_event_loop(loop)