type(logm).Fetch = LogManagerFetch
type(logm).DumpInFile = LogManagerDumpInFile
type(logm).LaunchMonitoringDumpFile = LogManagerLaunchMonitoringDumpFile
+ type(logm).FinalFetchBeforeDying = LogManagerFinalFetchBeforeDying
type(logm).GetLatestMonitoringDumpFile = LogManagerGetLatestMonitoringDumpFile
type(logm).DumpIORInFile = LogManagerDumpIORInFile
#
tempFileName = f.name
return LoadAndWrite( logm, tempFileName )
+def LogManagerFinalFetchBeforeDying(self):
+ import shutil
+ a,b = self.getFileNamePairOfLogger()
+ self.DumpInFile( b )
+ shutil.move( b, a)
+
def LogManagerGetLatestMonitoringDumpFile(self):
import shutil
import logging
logging.debug("LogManagerGetLatestMonitoringDumpFile SITUATION A")
if os.path.exists( b ):
os.remove( b )
+ self.FinalFetchBeforeDying()
return a
if lastVersion == b:
logging.debug("LogManagerGetLatestMonitoringDumpFile SITUATION B")
if os.path.exists( b ):
shutil.move( b, a)
+ self.FinalFetchBeforeDying()
return a
logging.warning("in LogManagerGetLatestMonitoringDumpFile an unexpected situation araises.")
return ""
#to expose all objects to pydoc
-__all__=dir()
+__all__ = dir()