Good day all,
I'm thinking it may be beneficial to sprinkle some debug logging throughout my app (a painting-type program), and to have this info written to a file. My current debugging strategy is to hook up a custom exception listener (sys.excepthook) and to allow the user to e-mail me a copy of the stack trace that caused the crash.
This has been pretty handy at seeing what the user's done to cause the program to crash, but I feel that a log file could certainly help.
I'm wondering what the best way to do this is. I'm thinking of enabling logging via a command-line switch and to create a log per "run" of the program, and to e-mail myself a copy of the log when a crash occurs. However, the log's won't help if the app's not in debug mode!
I'm a little worried of the log filling up too fast - if I place logging inside some mouse motion event handlers, then it'll create many entries. Also, a log file may grow pretty large, and just be filled with irrelevant information to me when examining a bug report.
How do you guys deal with this? Do you use wx's logging facilities or the standard python module? Can you offer me any hints. Thanks.
···
--
Steven Sproat, BSc
http://www.whyteboard.org/