Files
tt-support-tools/tt_logging.py
T
Pat Deegan 89ad9bfa93 feat(fpga): add support for the new FabricFox devkit
* TT FPGA tool, prelim import
* config.ini manager, prelim
* bitstream uploads and FPGA config.ini management

Contributed by @psychogenic, with minor edits by @htfab
2026-02-12 06:27:29 +01:00

21 lines
518 B
Python

import logging
import sys
def setup_logging(log_level):
# setup log
log_format = logging.Formatter(
"%(asctime)s - %(module)-10s - %(levelname)-8s - %(message)s"
)
# configure the client logging
log = logging.getLogger("")
# has to be set to debug as is the root logger
log.setLevel(log_level)
# create console handler and set level to info
ch = logging.StreamHandler(sys.stdout)
# create formatter for console
ch.setFormatter(log_format)
log.addHandler(ch)