Unlock instant, AI-driven research and patent intelligence for your innovation.

Method and device for multi-thread log entry

A recording method and recording device technology, applied in the field of business processing logic application system, capable of solving problems such as interleaving

Inactive Publication Date: 2010-03-10
ALIBABA GRP HLDG LTD
View PDF1 Cites 15 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] In order to solve the problem in the prior art that the records of each thread in the existing log file may all be interleaved together, an embodiment of the present invention provides a multi-thread log recording method, including:

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and device for multi-thread log entry
  • Method and device for multi-thread log entry
  • Method and device for multi-thread log entry

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0020] The first embodiment provided by the present invention is a multi-thread log recording method, three threads (T1, T2 and T3) are processed simultaneously, and each thread corresponds to 3 key steps, corresponding to which each thread will generate 3 logs Record (blog1, blog2, blog3), the method flow is as follows figure 1 shown, including:

[0021] Step 102: Separately store the log content corresponding to the T1 thread in the storage space corresponding to the A address space in the memory.

[0022] Step 104: After the T1 thread finishes processing, write all the log contents stored in the storage space corresponding to the A address space to the 20080808.log log file together. At this time, the T1 thread generates three log records T1blog1, T1blog2, T1blog3, and It will be continuously recorded in the 20080808.log log file.

[0023] In step 104, after the logging module receives the request, it can immediately write the three log records T2blog1, T2blog2, and T2blo...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a method and a device for multi-thread log entry. For solving the intersection problem of multi-thread logs, the method disclosed by the invention comprises: independently storing the corresponding log content of each thread of at least part of threads; after the processing of every thread of the at least part of threads and entering the independently stored corresponding log content of the threads in a log file intensively. As the log contents generated by the at least part of threads are stored independently and the independently stored log contents are entered in thelog file intensively, the log contents intensively entered in the log file are free from intersection with the log entries of other threads.

Description

technical field [0001] The invention belongs to the field of business processing logic application systems, and in particular relates to a multi-thread log recording method and device. Background technique [0002] In the application system, in order to facilitate developers to find problems, log files are usually written at key logical steps in business processing logic (such as an application program), and business processing logic forms multi-threads in the process of processing business. A single sequential control process in the logic, running multiple threads simultaneously in a single business processing logic to complete different tasks, called multi-threading) will record the processing results in log files in key logic steps. In this way, when a problem occurs in the business, the developer can check the log file to determine which step has the problem, which saves time. But there has always been a problem that has always troubled developers: a complete business p...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F9/38G06F9/46G06F11/14
Inventor 李磊
Owner ALIBABA GRP HLDG LTD