pyatran.runtime.rotate_log¶
-
pyatran.runtime.rotate_log(runpath, filename='errors.log')[source]¶ Rotate SCIATRAN log files out of the way
This function tries to emulate the behavior of logrotate. The file
filenamewill be moved tofilename.0,filename.0will be moved tofilename.1, and so on. Iffilenamedoesn’t exist, no rotation will take place.Parameters: runpath : str
The directory in which to search for
filenamefilename : str, optional
The base name of the files to be rotated. Defaults to SCIATRAN’s
errors.log.Returns: None