]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
[EDF30875] : Forward verbosity to insulated python process
authorAnthony Geay <anthony.geay@edf.fr>
Mon, 9 Sep 2024 13:10:10 +0000 (15:10 +0200)
committerAnthony Geay <anthony.geay@edf.fr>
Mon, 9 Sep 2024 13:10:10 +0000 (15:10 +0200)
src/Container/SALOME_PyNode.py

index 6ec1afc943840e618426d0e329192ad9915c661a..4f4129efe5b2e63e2fc74b0e811e69a942daea37 100644 (file)
@@ -858,11 +858,15 @@ class SeqByteReceiver:
 FinalCode = """import pickle
 from SALOME_PyNode import LogOfCurrentExecutionSession,MY_PERFORMANCE_LOG_ENTRY_IN_GLBS
 from SALOME_PyNode import ExchangeModeServerSideFactory
-from KernelBasis import VerbosityActivated
+from KernelBasis import VerbosityActivated,SetVerbosityLevel,SetVerbosityActivated
+from salome_utils import positionVerbosityOfLoggerRegardingState
 import CORBA
 import Engines
 import os
 from datetime import datetime
+SetVerbosityActivated( {} )
+SetVerbosityLevel( "{}" )
+positionVerbosityOfLoggerRegardingState()
 # WorkDir may be important to replay : "{}"
 orb = CORBA.ORB_init([''])
 caseDirectory = "{}"
@@ -1171,7 +1175,8 @@ sys.stderr.flush()""".format( MY_KEY_TO_DETECT_FINISH ) )
       resFileName = exCtx.setOutputContextEntryPoint( dirForReplayFiles, "outcontextsafe_{}.pckl".format( RetrieveUniquePartFromPfx( codeFileName  ) ) )
       mainExecFileName = os.path.join( dirForReplayFiles, "mainexecsafe_{}.py".format( RetrieveUniquePartFromPfx( codeFileName  ) ) )
       with open(mainExecFileName,"w") as f:
-        f.write( FinalCode.format( os.getcwd(), dirForReplayFiles, exchangeMode, codeFileName, contextFileName, resFileName, outargsname, iorScriptLog ) )
+        f.write( FinalCode.format( KernelBasis.VerbosityActivated() ,KernelBasis.VerbosityLevel(),
+                                  os.getcwd(), dirForReplayFiles, exchangeMode, codeFileName, contextFileName, resFileName, outargsname, iorScriptLog ) )
       timeOut = KernelBasis.GetExecutionTimeOut()
       nbRetry = KernelBasis.GetNumberOfRetry()
       logging.debug( "Nb retry = {}   Timout in seconds = {}".format( nbRetry, timeOut ) )