Automatically records log file