Import 2017-06-07 23:51:09: master 80436d11

Author Committer Branch Timestamp Parent
jcfr jcfr master 2014-12-06 00:55:56 master 6cbc4839
Changeset

ENH: Added logging functions for Python

Added info and error logging macros for Python modules.

Usage examples:

import slicer.log

slicer.log.info("This is an info message, logged as an INFO type message")
slicer.log.info("This is an info message, logged and also displayed in a popup for a short time", True)
slicer.log.info("This is an info message, logged and also displayed in a popup for 5 seconds", True, 5000)
slicer.log.info("This is an info message, logged and also displayed in a popup, the user has to click OK to continue", True, 0)

slicer.log.error("This is an error message, logged as an ERROR type message")
slicer.log.error("This is an error message, logged and also displayed in a popup, the user has to click OK to continue", True, 0)

From: Jean-Christophe Fillion-Robin <jchris.fillionr@kitware.com>

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

mod - Base/Python/CMakeLists.txt Diff File
add - Base/Python/slicer/log.py Diff File