The invention relates to the technical field of log recording, and particularly discloses a
chain type recording method and device based on
thread management and a storage medium, and the method comprises the following steps: entering a
business process, and setting a business unique code for the name of a current thread; the current thread is a sub-thread, and the thread name of the current thread is empty; if yes, obtaining the unique service code from the father thread name, combining the unique service code with the current thread ID, and generating and setting the thread name of the current thread; when the log
record is executed, obtaining the unique service code from the current thread name, and injecting the unique service code into the
log data; automatically storing the
log data containing the service unique code, automatically generating
record data associated with the service calling link based on the stored
log data, and ending log recording; according to the method, the unique service code is set at the service entrance, and the code is automatically transmitted in the calling link and the sub-thread, so that automatic association between the chained
record of the log data and the service calling link is realized.