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 filename will be moved to filename.0, filename.0 will be moved to filename.1, and so on. If filename doesn’t exist, no rotation will take place.

Parameters:

runpath : str

The directory in which to search for filename

filename : str, optional

The base name of the files to be rotated. Defaults to SCIATRAN’s errors.log.

Returns:

None