Enable colored logging

This commit is contained in:
Christian Wolf 2022-12-04 18:49:20 +01:00
parent 240824e808
commit 561dab897b
2 changed files with 20 additions and 1 deletions

View File

@ -1,3 +1,17 @@
attrs==22.1.0
beautifulsoup4==4.11.1
colorama==0.4.6
coloredlogs==15.0.1
coverage==6.5.0
exceptiongroup==1.0.1
humanfriendly==10.0
iniconfig==1.1.1
packaging==21.3
pluggy==1.0.0
pyparsing==3.0.9
pytest==7.2.0
pytest-cov==4.0.0
pytest-mock==3.10.0
soupsieve==2.3.2.post1
tabulate==0.9.0
tomli==2.0.1

View File

@ -1,10 +1,15 @@
import solo_turnier
import logging
import coloredlogs
def __initLogging():
logging.basicConfig()
logging.root.setLevel(logging.NOTSET)
return logging.getLogger('solo_turnier')
logger = logging.getLogger('solo_turnier')
coloredlogs.install(level=5, logger=logger)
return logger
def main():
l = __initLogging()