Import 2017-06-07 23:51:09: master a91a98e2

Author Committer Branch Timestamp Parent
lassoan lassoan master 2016-02-11 20:46:38 master 94062cef
Changeset

ENH: Enable full logging of python error and warning messages

Currently, if a non-debug message is logged from Python (using logging.info, logging.warning, logging.error) then the following appears in the log:
[CRITICAL][Stream] 11.02.2016 14:28:29 [] (unknown:0) - this is a warning message

If we enable full logging of non-debug messages then we get file name and line number as well:
[WARNING][Python] 11.02.2016 14:28:29 [Python] (MyLoggingTest.py:123) - this is a warning message
[CRITICAL][Stream] 11.02.2016 14:28:29 [] (unknown:0) - this is a warning message

The change in this commit enables full logging of non-debug messages, which has the slight disadvantage of having two entries for each error (one corresponding to the message appearing on the Python console and the other is the actual error log) but it provides the filename and line number, which is very useful for debugging.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@24929 3bd1e089-480b-0410-8dfb-8563597acbee

mod - Base/Python/slicer/__init__.py Diff File