mirror of
https://github.com/TinyTapeout/tt-support-tools.git
synced 2026-11-02 20:26:10 +01:00
* TT FPGA tool, prelim import * config.ini manager, prelim * bitstream uploads and FPGA config.ini management Contributed by @psychogenic, with minor edits by @htfab
21 lines
518 B
Python
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)
|