Open JeremyRand opened 9 years ago
I am very happy with this logging configuration: https://github.com/phelix/nameGUI/blob/master/lib/mylogging.py It would also get rid of all 'print' statements, improving py3 compatibility.
Suggested procedure:
2to3 -f print
to replace print "foo"
by print("foo")
everywhereprint
by log.info
; implement logging creation function in "common" if debug
statements and replace log.info
by log.debug
in these places; also set log level in main module
The current logging system is pretty inflexible, it doesn't show timestamps, only supports two verbosity levels, and doesn't directly support logging to a file. Python has a standard logging module, has anyone used it before?