From: Tim L. <guy...@gm...> - 2012-05-28 21:41:28
|
It looks as though there should be a better way to manage warnings generally. I have never used the Windows Event Log service (AIUI it it the log that scammers tell you to look at when they are explaining the need for them to take over your machine) but it seems that this is where all the output that is currently produced by print statements should be directed to on Windows. According to [1], it seems as though the existing print statements should be changed to logging.warning() (or possibly logging.error() or higher) and assuming that [2] is still valid, these messages would cause a button to be shown "for 180 sec. after a log is received. Activating this button the WarnHandler will pop up a dialog with the list of the buffered logs." Additionally "Since the log level of the root logger is set to WARNING by default the StreamHandler will also receive only log at level WARNING and above." It is important that these outputs are produced even if Gramps is run with the 'optimise' flag - I am not clear from [3] whether warning and above are output with optimise - help please. For windows, it looks as though streamhandler should be diverted to "NTEventLogHandler instances send messages to a Windows NT/2000/XP event log." (see [1]). Is that right? Anyone able to do it? Regards, Tim. [1] http://docs.python.org/howto/logging.html [2] http://www.gramps-project.org/wiki/index.php?title=Logging_system [3] http://www.gramps-project.org/wiki/index.php?title=Debugging_GRAMPS#Add_debug_statements -- View this message in context: http://gramps.1791082.n4.nabble.com/unqualified-LOG-statements-tp4655155p4655170.html Sent from the GRAMPS - Dev mailing list archive at Nabble.com. |