A log acquisition method which can easily acquire processing logs of
software, and can reduce the number of processes required to analyze bugs
is provided. More specifically, a log acquisition method for a program
having functions, includes a step of identifying a designated one of
functions in an OS which are called upon execution of the program, and a
step of rewriting the address of the loaded functions that execute
predetermined processes and the address of the designated function in the
OS to that of a function for log acquisition. The function for log
acquisition includes a step of calling the functions that execute
predetermined processes and the designated function in the OS and passing
the execution result of the called functions to the program, and a step
of recording predetermined information upon calling the functions that
execute predetermined processes and the designated function in the OS,
and predetermined information upon receiving the result.