Self-adaptive efficient output processing method of log file

A log file and output processing technology, which is applied in the field of log output, can solve problems such as multiple resources and affecting the efficiency of log file writing, and achieve the effect of small log output delay and low output efficiency

Active Publication Date: 2010-03-03
CASCO SIGNAL
View PDF0 Cites 1 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

If the number of logs output per unit time is large, the operation of opening and closing log files will take up more resources, especially when the log file is large, which will affect the efficiency of log file writing

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
  • Self-adaptive efficient output processing method of log file
  • Self-adaptive efficient output processing method of log file
  • Self-adaptive efficient output processing method of log file

Examples

Experimental program
Comparison scheme
Effect test

Embodiment

[0027] like figure 1 As shown, an efficient output processing method for adaptive log files, the specific steps are as follows:

[0028] Step 1, define the log output delay. Assuming that the generation time of log L is 12:00:00 on July 6, 2009, and the log output time to the file is 12:0:30 on July 6, 2009, the output delay of this log is for 30 seconds;

[0029] Step 2, define the average log output delay. After opening the log file and before closing the log file, suppose a total of 2 logs are output. The generation time of these 2 logs is 0 seconds and 10 seconds at 12:00 on July 6, 2009, respectively. On July 6, 2009 The two logs are output to the log file together at 12:50 on the day. The average log output delay when outputting logs this time is

[0030] Step 3: Initialize the log output size threshold. Let the log output size threshold H be 0;

[0031] Step 4: Dynamically adjust the log output size threshold. Let the logs that are not currently written to the...

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 relates to a self-adaptive efficient output processing method of a log file. The method comprises the following steps: 1) defining log output time delay; 2) defining average log output time delay; 3) initializing a threshold of log output size and enabling the threshold H=0; 4) dynamically adjusting the threshold of the log output size according to the average log output time delay and the non-output log size so as to decrease the average log output time delay; and 5) outputting the log file. Compared with the prior art, the processing method has the advantage that: the method helps effectively solve the problem of lower output efficiency caused by frequently opening and closing the file.

Description

technical field [0001] The invention relates to a log output method, in particular to an efficient output processing method for adaptive log files. Background technique [0002] In a software system, a log function is required to record events that occur during the running of the software system. Some current log modules include Log4cpp, Log4j, Log4cxx, etc. These modules provide a unified log input interface, which can output log files to local files. [0003] When the log is output to a file, the log file is first opened, then the log is written to the file, and finally the log file is closed. If the number of logs output per unit time is large, the operation of opening and closing the log file will occupy more resources, especially when the log file is large, it will affect the efficiency of log file writing. SUMMARY OF THE INVENTION [0004] The purpose of the present invention is to provide an efficient output processing method for adaptive log files in order to ove...

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 Applications(China)
IPC IPC(8): G06F11/34
Inventor 郝黎明
Owner CASCO SIGNAL
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products