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

Log level prediction method and device and storage medium

A prediction method and log technology, applied in the direction of error detection/correction, instrument, software maintenance/management, etc., can solve the problems of reducing development efficiency, missing key information, and information not being stored, so as to improve development efficiency and reduce The effect of decision time

Active Publication Date: 2020-02-18
TRANSWARP INFORMATION TECH SHANGHAI
View PDF8 Cites 5 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] Existing logging frameworks and tools require that each logging statement be assigned a log level to describe the level of detail of the recorded information. If a logging statement is assigned an inappropriate level, it may cause the information that should be recorded not to be recorded. It is stored, making subsequent log analysis and other work missing key information
In the existing technology, in order to weigh the benefits and costs of a large number of logs with sufficient content, developers can only rely on their own development experience and domain knowledge to determine the level of logging statements, resulting in frequent insertion of logging statements It often takes a lot of time and energy to reduce the development efficiency

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 level prediction method and device and storage medium
  • Log level prediction method and device and storage medium
  • Log level prediction method and device and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0036] figure 1 It is a flow chart of a method for predicting a log level in Embodiment 1 of the present invention. This embodiment is applicable to the case of predicting the log level of a log record statement to be inserted, and the method can be executed by a log level prediction device. The means can be realized by means of software and / or hardware, and generally can be integrated in computer equipment. Such as figure 1 As shown, the method of the embodiment of the present invention specifically includes:

[0037] Step 110 , acquiring a code block to be inserted into a log record statement, and the log record statement is used to form a record log after triggering execution.

[0038] In this embodiment, the log record statement is used to record information or handle some errors encountered during system operation, and a record log can be formed after triggering execution. There are 10 types of code blocks to be inserted into logging statements, including: CatchBlock, ...

Embodiment 2

[0067] Figure 2a It is a flow chart of a log level prediction method in Embodiment 2 of the present invention. The embodiments of the present invention may be combined with various optional solutions in the foregoing embodiments. In the embodiment of the present invention, before obtaining the code block to be inserted into the log record statement, it also includes: searching for the log record statement in the training item, and the code block containing the log record statement; according to the preset feature model, the code block and Feature extraction is performed on the files belonging to the code block, and the code block features and file features that match the preset feature model are obtained; the extracted code block features and file features are input into the preset algorithm model for training, and the log level prediction model is obtained .

[0068] Step 210, searching for the log record statement in the training item and the code block containing the log...

Embodiment 3

[0091] image 3 is a schematic structural diagram of a log level prediction device in Embodiment 3 of the present invention. The device can be implemented in the form of software and / or hardware, and generally can be integrated into computer equipment. Such as image 3 As shown, the device includes: a code block acquisition module 310, a feature acquisition module 320, a level determination module 330 and a log statement insertion module 340;

[0092] A code block obtaining module 310, configured to obtain a code block to be inserted into a log record statement, and the log record statement is used to form a record log after triggering execution;

[0093] The feature acquisition module 320 is used to perform feature extraction on the code block and the file to which the code block belongs according to the preset feature model, so as to obtain the code block feature and the file feature;

[0094] The level determination module 330 is used to predict the log level according t...

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 embodiment of the invention discloses a log level prediction method and device and a storage medium. The method comprises the steps of obtaining a code block of a to-be-inserted log record statement, wherein the log record statement is used for forming a record log after triggering execution; according to a preset feature model, performing feature extraction on the code block and the file to which the code block belongs to obtain code block features and file features; predicting a log level according to the code block features and the file features, the log level being used for describingthe detail degree of information recorded in the record log; and inserting a log record statement into the code block according to the log level. According to the embodiment of the invention, log level prediction can be carried out on the to-be-inserted log record statement, the log level decision time is reduced, and the development efficiency is improved.

Description

technical field [0001] The embodiments of the present invention relate to the technical field of log recording, and in particular, to a log level prediction method, device, and storage medium. Background technique [0002] Because of its ability to capture and record system runtime information, logging statements have become the main source of information for analyzing the cause of problems when a software system encounters a failure. Properly inserting logging statements into software code has become part of a developer's daily work. [0003] Existing logging frameworks and tools require that each logging statement be assigned a log level to describe the level of detail of the recorded information. If a logging statement is assigned an inappropriate level, it may cause the information that should be recorded not to be recorded. It is stored, making subsequent log analysis and other work missing key information. In the existing technology, in order to weigh the benefits an...

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/30G06F8/75
CPCG06F8/75G06F11/3093
Inventor 荣国平薛冰冰邵栋张贺
Owner TRANSWARP INFORMATION TECH SHANGHAI
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