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: 2011-09-14
CASCO SIGNAL
View PDF0 Cites 0 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] Such as figure 1 As shown, an adaptive log file efficient output processing method, the specific steps are as follows:

[0028] The first step is to define the log output delay. Assuming that log L was generated at 12:00:00 on July 6, 2009, and the time to output the log to the file is 12:00:30 on July 6, 2009, the output delay of this log is for 30 seconds;

[0029] Step 2, define the average log output delay. Before closing the log file after opening the log file, it is assumed that 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, and on July 6, 2009 At 12:50 on the day, these two logs are output together into the log file. 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 not current...

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 adaptive log file efficient output processing method. Background technique [0002] In a software system, a log function is needed 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 and can output log files to local files. [0003] When the log is output to a file, first open the log file, then write the log to the file, and finally close the log file. 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. Contents of the invention [0004] The object of the present invention is to provide an adaptive log file efficient output processing method in order to overcome the above-mentioned de...

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 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