From a35cd8ff9277153586fb016f3596e6755da46946 Mon Sep 17 00:00:00 2001 From: erickson Date: Sun, 19 Aug 2007 13:54:43 +0000 Subject: [PATCH] adding thread name to the log output git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1085 9efc2488-bf62-4759-914b-345cdb29e865 --- src/python/osrf/log.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/python/osrf/log.py b/src/python/osrf/log.py index 9ba9a12..df63093 100644 --- a/src/python/osrf/log.py +++ b/src/python/osrf/log.py @@ -13,7 +13,7 @@ # GNU General Public License for more details. # ----------------------------------------------------------------------- -import traceback, sys, os, re +import traceback, sys, os, re, threading from osrf.const import * loglevel = 4 @@ -72,7 +72,7 @@ def __osrfLog(level, msg): # XXX when file logging is implemented, wrap io in a semaphore for thread safety file = frgx.sub('',tb[0]) - msg = '[%s:%d:%s:%s] %s' % (lvl, os.getpid(), file, tb[1], msg) + msg = '[%s:%d:%s:%s:%s] %s' % (lvl, os.getpid(), file, tb[1], threading.currentThread().getName(), msg) syslog.syslog(slvl, msg) if level == OSRF_LOG_ERR: -- 2.11.0