Change to python3, moved to argparse, adding a config file for defaults, adding logging

This commit is contained in:
nzkarit
2017-09-10 20:29:20 +12:00
parent dd857bcadc
commit c8e625f608
5 changed files with 87 additions and 21 deletions

28
logging.cfg Normal file
View File

@@ -0,0 +1,28 @@
[loggers]
keys=root
[handlers]
keys=consoleHandler, timedRotatingFileHandler
[formatters]
keys=simpleFormatter
[logger_root]
level=DEBUG
handlers=consoleHandler, timedRotatingFileHandler
[handler_timedRotatingFileHandler]
class=handlers.TimedRotatingFileHandler
level=DEBUG
formatter=simpleFormatter
args=('ADSB_Encoder.log', 'H', 1, 72)
[handler_consoleHandler]
class=StreamHandler
level=WARNING
formatter=simpleFormatter
args=(sys.stdout,)
[formatter_simpleFormatter]
format=%(asctime)s - %(name)s - %(levelname)s - %(message)s
datefmt=