Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

A log collection method, device, equipment and computer-readable storage medium

A collection device and computer program technology, applied in the storage field, can solve problems such as occupying application program memory, affecting the running speed of application programs, and affecting the writing efficiency of logs written into log files, so as to reduce the probability of write blocking and improve log files. The effect of collection efficiency

Active Publication Date: 2022-06-17
北京浪潮数据技术有限公司
View PDF7 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] At present, the common practice of application log collection is to collect logs from log files. During the log collection process, a large number of operations need to be performed on log files, which affects the writing efficiency of logs written to log files, resulting in log write blocking, especially It is especially obvious when the log writing frequency is high, and the log collection efficiency is low, occupying a large amount of application memory, and affecting the running speed of the application

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
  • A log collection method, device, equipment and computer-readable storage medium
  • A log collection method, device, equipment and computer-readable storage medium
  • A log collection method, device, equipment and computer-readable storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0041] see figure 1 , figure 1 It is an implementation flowchart of the log collection method in the embodiment of the present invention, and the method may include the following steps:

[0042] S101: When it is detected that the log is generated, read the thread execution priorities of the log printing thread and the log collection thread from the asynchronous execution thread list.

[0043] The thread execution priorities of the log printing thread and the log collection thread are pre-stored in the asynchronous execution thread list.

[0044] An asynchronous execution thread list in which thread execution priorities of the log printing thread and the log collection thread are stored may be created in advance. Whether there is log generation can be detected in real time or according to a preset time interval. When the existence of log generation is detected, the thread execution priority of the log printing thread and the log collection thread is read from the asynchronous...

Embodiment 2

[0052] see figure 2 , figure 2 It is another implementation flowchart of the log collection method in the embodiment of the present invention, and the method may include the following steps:

[0053] S201: When it is detected that there is log generation, read the thread execution priorities of the log printing thread and the log collection thread from the asynchronous execution thread list.

[0054] The thread execution priorities of the log printing thread and the log collection thread are pre-stored in the asynchronous execution thread list.

[0055] S202: When it is determined that the thread execution priority of the log printing thread is higher than the thread execution priority of the log collection thread, firstly start the log printing thread to call the log framework interface obtained by modifying the source package of the log framework to print the log, and print the log in the After detecting that the log printing is completed, start the log collection thread...

Embodiment 3

[0067] see image 3 , image 3 It is another implementation flowchart of the log collection method in the embodiment of the present invention, and the method may include the following steps:

[0068] S301: When it is detected that there is log generation, read the thread execution priorities of the log printing thread and the log collection thread from the asynchronous execution thread list.

[0069] The thread execution priorities of the log printing thread and the log collection thread are pre-stored in the asynchronous execution thread list.

[0070] S302: When it is determined that the thread execution priority of the log printing thread is higher than the thread execution priority of the log collection thread, first start the log printing thread to call the log framework interface obtained by encapsulating the log framework to print the log, and when the log is detected After the printing is completed, start the log collection thread to call the log framework interface ...

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 log collection method, which includes: when detecting that there is log generation, reading the thread execution priorities of the log printing thread and the log collection thread from the asynchronous execution thread list; when determining the thread execution priority of the log printing thread When the thread execution priority is higher than that of the log collection thread, first start the log printing thread to call the log framework interface for log printing, and then start the log collection thread to call the log framework interface for log collection; otherwise, first start the log collection thread to call the log framework interface Collect logs, and then start the log printing thread to call the log framework interface for log printing. The invention greatly reduces the probability of log writing blockage, improves the efficiency of log collection, greatly releases the memory of the application program, and improves the running speed of the application program. The invention also discloses a log collection device, equipment and storage medium, which have corresponding technical effects.

Description

technical field [0001] The present invention relates to the field of storage technologies, and in particular, to a log collection method, apparatus, device, and computer-readable storage medium. Background technique [0002] The so-called log (Log) refers to the time-ordered collection of certain operations of the objects specified by the system and their operation results. Each log record describes a single system event. The log records necessary and valuable information for IT resource-related activities such as servers, workstations, firewalls, and application software, which is very important for system monitoring, query, reporting, and security auditing. of. Therefore, it is necessary to do a good job of collecting logs. [0003] At present, the common practice of application log collection is to collect logs from log files. During the log collection process, a large number of operations need to be performed on log files, which affects the efficiency of log writing to...

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): G06F16/18G06F16/13G06F3/12
CPCG06F16/1815G06F16/13G06F3/1203
Inventor 王宝山
Owner 北京浪潮数据技术有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products