An image forming apparatus for performing functions, includes a storage
region configured to store logs of network services that execute the
functions, wherein the storage region is divided into plural function
segments each corresponding to one of the functions; a managing unit
configured to manage the logs in groups formed by grouping together the
network services in terms of the corresponding functions; a recording
unit configured to record the logs of the network services into each of
the function segments in the storage region according to the
corresponding functions; and a stopping unit configured to stop the
network services in terms of the groups managed by the managing unit,
based on storage state information indicating an available space in each
of the function segments in the storage region.