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

Log generation method and device

A technology for generating devices and logs, which is applied in the information field, can solve problems such as insufficient performance, low log generation efficiency, and easy bottlenecks, and achieve the effect of improving generation efficiency

Active Publication Date: 2019-02-01
SHENZHEN KINGDOM TECH
View PDF5 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Yet described Java language log storehouse, as the open source code project log4j of Apache, the generating efficiency of log is not high, and easily causes bottleneck when using in large-scale Internet application; The interface of described C++ log storehouse is complicated, and performance is insufficient

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
  • Log generation method and device
  • Log generation method and device
  • Log generation method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0017] In order to make the object, technical solution and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present invention, not to limit the present invention.

[0018] In the embodiment of the present invention, the log generation process is divided into a log data acquisition process and a write process, and a circular queue is used for data communication between the acquisition process and the write process; when a log generation request is received, the log data to be written is obtained log data and buffer the log data into the preset ring queue; in the writing process, read the log data from the ring queue, and write the log data into the memory according to the preset method , to generate a log file. There is no locking mechanism between the log dat...

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 present invention is applicable to the technical field of information and provides a log generation method and apparatus. The method comprises: when receiving a log generation request, obtaining to-be-written log data, and caching the log data into a circular queue; and according to a cache space of the circular queue, reading the log data from the circular queue, and writing the log data into a memory in a preset manner so as to generate a log file. According to the method and the apparatus, a locking mechanism does not exist between an obtaining process and a writing process of the log data, so that the generating efficiency of the log file is efficiently improved and a guarantee is provided for efficient operation of an operational system.

Description

technical field [0001] The invention belongs to the field of information technology, and in particular relates to a log generation method and device. Background technique [0002] Existing business application systems (such as Internet application systems) have higher and higher requirements for log systems. For subsequent operation and maintenance and big data analysis, it is usually necessary to record most of the business operations and data of the system in the form of logs. Existing log generation methods mainly include Java language log library and C++ log library. However, the Java language log library, such as the open source code project log4j of Apache, has low generation efficiency of logs, and easily causes bottlenecks when used in large-scale Internet applications; the interface of the C++ log library is complex and insufficient in performance. Contents of the invention [0003] In view of this, an embodiment of the present invention provides a log generatio...

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
Patent Type & Authority Patents(China)
IPC IPC(8): G06F11/34
Inventor 姜旅田雪江彬石斌飞
Owner SHENZHEN KINGDOM TECH