myTS3/util.py

34 lines
624 B
Python

"""
TBD
"""
__author__ = "Lukas Mahler"
__version__ = "0.0.0"
__date__ = "25.09.2021"
__email__ = "m@hler.eu"
__status__ = "Development"
# Default
import logging
from datetime import date
def setupLogger():
"""
"""
log = logging.getLogger()
now = date.today().strftime("%Y-%m-%d")
handler = logging.FileHandler(f"myTS3_{now}.log", encoding="utf-8")
logformat = logging.Formatter("%(asctime)s %(levelname)7s %(message)s", "%d-%m-%Y %H:%M:%S")
handler.setFormatter(logformat)
log.addHandler(handler)
log.setLevel(logging.DEBUG)
return log
if __name__ == "__main__":
exit()