[open-ils-commits] r946 - constrictor/trunk/constrictor (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Aug 3 18:07:35 EDT 2010
Author: erickson
Date: 2010-08-03 18:07:28 -0400 (Tue, 03 Aug 2010)
New Revision: 946
Modified:
constrictor/trunk/constrictor/log.py
Log:
append the script thread to the log messages. import from within to funcs to prevent import loop probs
Modified: constrictor/trunk/constrictor/log.py
===================================================================
--- constrictor/trunk/constrictor/log.py 2010-08-03 15:50:06 UTC (rev 945)
+++ constrictor/trunk/constrictor/log.py 2010-08-03 22:07:28 UTC (rev 946)
@@ -26,13 +26,16 @@
def log_error(msg=''):
if loglevel < 1: return
- sys.stderr.write('Error*: %s\n' % msg)
+ from script import ScriptThread
+ sys.stderr.write('Error[%d]: %s\n' % (ScriptThread.get_thread_id(), msg))
sys.stderr.flush()
def log_info(msg=''):
if loglevel < 2: return
- print 'Info: %s' % msg
+ from script import ScriptThread
+ print 'Info[%d]: %s' % (ScriptThread.get_thread_id(), msg)
def log_debug(msg=''):
if loglevel < 3: return
- print 'Debug: %s' % msg
+ from script import ScriptThread
+ print 'Debug[%d]: %s' % (ScriptThread.get_thread_id(), msg)
More information about the open-ils-commits
mailing list