Salome HOME
projects
/
samples
/
genericsolver.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
4c46dca
)
Added more detailed log messages
author
Renaud Barate
<renaud.barate@edf.fr>
Fri, 29 Oct 2010 15:19:23 +0000
(15:19 +0000)
committer
Renaud Barate
<renaud.barate@edf.fr>
Fri, 29 Oct 2010 15:19:23 +0000
(15:19 +0000)
src/GENERICSOLVER/DEVIATION.py
patch
|
blob
|
history
diff --git
a/src/GENERICSOLVER/DEVIATION.py
b/src/GENERICSOLVER/DEVIATION.py
index 4a1835a6eadaee914e5465ec8dda739105af11a9..bb5414a4b67fa5f48bdc5750dc873dadf467b165 100644
(file)
--- a/
src/GENERICSOLVER/DEVIATION.py
+++ b/
src/GENERICSOLVER/DEVIATION.py
@@
-19,10
+19,13
@@
# $Id$
#
# $Id$
#
+import os
import logging
import threading
import inspect
import traceback
import logging
import threading
import inspect
import traceback
+import platform
+import thread
import salome
import GENERICSOLVER_ORB__POA
import salome
import GENERICSOLVER_ORB__POA
@@
-126,6
+129,11
@@
class DEVIATION(GENERICSOLVER_ORB__POA.DEVIATION_Gen,
exc = SALOME.ExceptionStruct(SALOME.INTERNAL_ERROR, message,
inspect.stack()[1][1], inspect.stack()[1][2])
raise SALOME.SALOME_Exception(exc)
exc = SALOME.ExceptionStruct(SALOME.INTERNAL_ERROR, message,
inspect.stack()[1][1], inspect.stack()[1][2])
raise SALOME.SALOME_Exception(exc)
+
+ def _getIdMessage(self):
+ return "%s in container %s running on %s, process %d, thread %d" % \
+ (self._instanceName, self._containerName,
+ platform.node(), os.getpid(), thread.get_ident())
def Init(self, studyId, detCaseEntry):
"""
def Init(self, studyId, detCaseEntry):
"""
@@
-133,7
+141,7
@@
class DEVIATION(GENERICSOLVER_ORB__POA.DEVIATION_Gen,
use with OpenTURNS in SALOME 5.1.5 and later (for YACS integration)
"""
try:
use with OpenTURNS in SALOME 5.1.5 and later (for YACS integration)
"""
try:
- logger.info("Init: " + self._
containerName + ' ; ' + self._instanceName
)
+ logger.info("Init: " + self._
getIdMessage()
)
DEVIATION.lock.acquire()
salome.salome_init()
DEVIATION.lock.release()
DEVIATION.lock.acquire()
salome.salome_init()
DEVIATION.lock.release()
@@
-149,7
+157,7
@@
class DEVIATION(GENERICSOLVER_ORB__POA.DEVIATION_Gen,
use with OpenTURNS in SALOME 5.1.5 and later (for YACS integration)
"""
try:
use with OpenTURNS in SALOME 5.1.5 and later (for YACS integration)
"""
try:
- logger.info("Exec: " + self._
containerName + ' ; ' + self._instanceName
)
+ logger.info("Exec: " + self._
getIdMessage()
)
logger.debug("inputVarList: %s" % paramInput.inputVarList)
logger.debug("outputVarList: %s" % paramInput.outputVarList)
logger.debug("inputValues: %s" % paramInput.inputValues)
logger.debug("inputVarList: %s" % paramInput.inputVarList)
logger.debug("outputVarList: %s" % paramInput.outputVarList)
logger.debug("inputValues: %s" % paramInput.inputValues)
@@
-189,7
+197,7
@@
class DEVIATION(GENERICSOLVER_ORB__POA.DEVIATION_Gen,
It cleans everything set so far.
"""
try:
It cleans everything set so far.
"""
try:
- logger.info("Finalize: " + self._
containerName + ' ; ' + self._instanceName
)
+ logger.info("Finalize: " + self._
getIdMessage()
)
except:
self._raiseSalomeError()
except:
self._raiseSalomeError()