From 0af7b188e30a339bda3ebc15e1533c47bee09a8f Mon Sep 17 00:00:00 2001 From: Anthony Geay Date: Mon, 9 Sep 2024 15:10:10 +0200 Subject: [PATCH] [EDF30875] : Forward verbosity to insulated python process --- src/Container/SALOME_PyNode.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Container/SALOME_PyNode.py b/src/Container/SALOME_PyNode.py index 6ec1afc94..4f4129efe 100644 --- a/src/Container/SALOME_PyNode.py +++ b/src/Container/SALOME_PyNode.py @@ -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 ) ) -- 2.39.2