Omaha #4383 Improved logging in iscMosaic and iscDataRec

Change-Id: I2a93a46e6bb0db447ab722265f2cc14e3c957a69

Former-commit-id: 233bbf78a5 [formerly 28e7b70e9b8e495e22de71881ef9aa2932e8accf]
Former-commit-id: 9e7bb1053a
This commit is contained in:
Ron Anderson 2015-04-23 13:13:40 -05:00
parent 7c31c892fd
commit beb54304de
2 changed files with 10 additions and 7 deletions

View file

@ -22,7 +22,7 @@
##
import iscMosaic,iscUtil
import os, stat, sys, re, string, traceback, types
import os, stat, sys, re, string, types
import time, xml, LogStream, IrtAccess
import IrtServer
from xml.etree import ElementTree
@ -46,6 +46,7 @@ from java.util import ArrayList
# 12/08/2014 4953 randerso Added support for sending/receiving TCV files
# Additional code cleanup
# 04/08/2015 4383 dgilling Support FireWx ISC.
# 04/23/2015 4383 randerso Fixed exception logging
#
##
@ -78,7 +79,7 @@ def purgeFiles(msgid, files):
try:
os.remove(file)
except:
logEvent("iscDataRec Failed to remove: ",file)
logException("iscDataRec Failed to remove file %s: ", str(file))
def execIscDataRec(MSGID,SUBJECT,FILES):
@ -109,7 +110,7 @@ def execIscDataRec(MSGID,SUBJECT,FILES):
destTree = ElementTree.ElementTree(ElementTree.XML(xmlFileBuf))
iscE = destTree.getroot()
except:
logProblem("Malformed XML received")
logException("Malformed XML received")
return
#no XML destination information. Default to dx4f,px3 98000000, 98000001
@ -220,7 +221,8 @@ def execIscDataRec(MSGID,SUBJECT,FILES):
logEvent('Sent to:',
irt.printServerInfo(destServer), "connectT=", delta1, "xmtT=", delta2)
except:
logProblem("iscDataRec failed!",traceback.format_exc())
logException("iscDataRec failed!")
finally:
# cleanup
purgeFiles(MSGID, FILES)
@ -303,8 +305,8 @@ def main(argv):
execIscDataRec(MSGID,SUBJECT,FILES)
except:
logProblem('Failure:', traceback.format_exc())
logException('Failure:')
except:
logProblem("FAIL: ", traceback.format_exc())
logException("FAIL: ")

View file

@ -23,6 +23,7 @@
# ------------ ---------- ----------- --------------------------
# 02/17/2015 4139 randerso Replaced call to iscTime.timeFromComponents
# with call to calendar.timegm
# 04/23/2015 4383 randerso Changed to log arguments to aid in troubleshooting
##
@ -521,9 +522,9 @@ class IscMosaic:
self.__processTimePeriod = (startTime, endTime)
initLogger(self.__logFile)
logger.info("iscMosaic Starting args: %s", str(args))
def execute(self):
logger.info("iscMosaic Starting")
# get the WxDefinition and DiscreteDefinition
config = IFPServerConfigManager.getServerConfig(self.__mysite)