39 lines
983 B
Python
39 lines
983 B
Python
'''
|
|
Created on 27 set 2019
|
|
|
|
@author: Emanuele Trabattoni
|
|
'''
|
|
import time
|
|
import sys
|
|
import printer as p
|
|
import commands
|
|
import logging
|
|
|
|
def main():
|
|
printer = p.MarkoPrinter('./conf.json')
|
|
printer.connetti()
|
|
|
|
pass
|
|
|
|
if __name__ == '__main__':
|
|
# Setup Logger
|
|
LOGGER = logging.getLogger(__name__)
|
|
LOGGER.setLevel(logging.DEBUG)
|
|
LOGGER.propagate = False
|
|
FORMATTER = logging.Formatter(("%(asctime)s|%(levelname)-7s|%(funcName)-10s|%(lineno)-3d: %(message)-50s"),
|
|
("%m-%d %H:%M:%S"))
|
|
# File Logging
|
|
fh = logging.FileHandler(("./log/dimelog.log"))
|
|
fh.setLevel(logging.WARNING)
|
|
fh.setFormatter(FORMATTER)
|
|
LOGGER.addHandler(fh)
|
|
# Console Logging
|
|
cl= logging.StreamHandler(sys.stdout)
|
|
cl.setLevel(logging.INFO)
|
|
cl.setFormatter(FORMATTER)
|
|
LOGGER.addHandler(cl)
|
|
|
|
LOGGER.warning("MarcaturaDime Started!")
|
|
|
|
sys.exit(main())
|
|
pass |