1. A computer for estimating a format of a log message, the computer comprising: one or more hardware processors; directed graph structure creation means for creating a first directed graph structure by dividing a first log message by predetermined characters to define divided portions as nodes and arranging the nodes in order from the beginning of the first log message, and creating a second directed graph structure by dividing the second log message by the predetermined characters to define divided portions as nodes and arranging the nodes in order from the beginning of the second log message; node detection means for comparing nodes in the first directed graph structure with nodes in the second directed graph structure to detect a node in the first directed graph structure and a node in the second directed graph structure that are nodes other than nodes including a corresponding character string; directed graph structure change means for adding to the first directed graph structure the node detected in the second directed graph structure among the detected nodes as a first branch node; and format estimation means for estimating the format, based on the first directed graph structure including the first branch node added thereto, wherein the format includes a first portion associated with a node including a corresponding character string, a second portion associated with a node whose appearance tendency of character string is similar between the node detected in the first directed graph structure and the node detected in the second directed graph structure, and a third portion associated with a node other than nodes having a similar appearance tendency of character string.