Patent ID: 8325375

Claim:
An image forming apparatus comprising: an acquisition unit configured to acquire log data recording operation of the image forming apparatus; a first storage device configured to store the acquired log data in a volatile memory; a calculation unit configured to calculate a total size of the log data stored in the volatile memory; a determination unit configured to determine whether the calculated total size of the log data has reached a threshold value; a second storage device configured to store the log data from the first storage unit when the total size of the log data has reached the threshold value, the second storage device configured to store the log data from the first storage device in a nonvolatile memory; a changing unit configured to change the threshold value according to an operation state of the image forming apparatus; a first time calculation unit configured to calculate first time until the total size of the log data stored in the volatile memory reaches the threshold value; and a second time calculation unit configured to calculate second time until storage of all the log data stored in the volatile memory is transferred to the nonvolatile memory of the second storage device, wherein the changing unit changes the threshold value to set a difference between the first time and the second time to a value within a predetermined range.