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

A log file analysis method, device, medium and computer equipment

A technology of log files and analysis methods, applied in the field of data analysis, can solve problems such as low analysis efficiency and inability to ensure analysis accuracy

Active Publication Date: 2022-07-05
武汉斗鱼鱼乐网络科技有限公司
View PDF5 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] Aiming at the problems existing in the prior art, the embodiment of the present invention provides a log file parsing method, device, medium, and computer equipment, which are used to solve the problem of low analysis efficiency and low analysis efficiency when manually analyzing Android logs in the prior art. Technical problems where accuracy cannot be guaranteed

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 file analysis method, device, medium and computer equipment
  • A log file analysis method, device, medium and computer equipment
  • A log file analysis method, device, medium and computer equipment

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0069] This embodiment provides a method for parsing log files, such as figure 1 shown, methods include:

[0070] S110, obtaining the target log file based on the file name of the target log file;

[0071] In order to realize the parsing of the log file, it is first necessary to obtain the target log file based on the file name of the target log file.

[0072] This application uses a pre-designed encapsulation function to encapsulate the overall parsing process, the encapsulation function is Defparse_log_file(file), the encapsulation function defines an acquisition function through the def keyword, the name of the acquisition function is parse_log_file, and the acquisition function has an input parameter file, file can represent a specific log file name.

[0073] Based on this, when the target log file needs to be obtained, assign the file name of the target log file to the input parameter file, that is, the target log file can be obtained based on the file name of the targe...

Embodiment 2

[0173] This embodiment provides an apparatus for parsing log files, such as figure 2 As shown, the device includes: an acquiring unit 21, a reading unit 22, a judging unit 23, an adding unit 24, an analyzing unit 25 and a printing unit 26; wherein,

[0174] an obtaining unit 21, configured to obtain the target log file based on the file name of the target log file;

[0175] The reading unit 22 polls the target log file. During the polling process, for the current line log, a read function is called to read the log content of the current line log, and the log of the current line log is read. The content is assigned to a preset line variable; the current line log is any line of log in the target log file;

[0176] Judging unit 23, for judging whether the value of the line variable is empty, if the value of the line variable is not empty, then match the start line log content of the target log file;

[0177] The adding unit 24 is configured to, if the log content of the start li...

Embodiment 3

[0281] This embodiment provides a computer device, such as image 3 As shown, it includes a memory 310, a processor 320, and a computer program 311 stored in the memory 310 and running on the processor 320. When the processor 320 executes the computer program 311, the following steps are implemented:

[0282] Obtain the target log file based on the file name of the target log file;

[0283] Perform polling on the target log file, in the polling process, for the current line log, call the read function to read the log content of the current line log, and assign the log content of the current line log to a preset value The line variable; the current line log is any line log in the target log file;

[0284] Determine whether the value of the line variable is empty, if the value of the line variable is not empty, then match the log content of the start line of the target log file;

[0285] If the log content of the start line of the target log file is successfully matched, it is...

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 provides a log file parsing method, device, medium and computer equipment. The method includes: polling the target log file, reading the log content of the current line log; judging whether the value of the line variable is empty, if not Empty, matches the log content of the start line of the target log file; if the match of the start line log content is successful, it is judged whether the start content of the start line log content is the log content that meets the preset requirements, if it is the log content that meets the preset requirements, Then add the start line log content to the current line set; obtain the remaining line log content one by one, and add the remaining line log to the current line set; parse the log content in the current line set based on the preset log structure, get And print the parsing result corresponding to the target log file; in this way, the target log file can be automatically parsed to obtain the parsing result of the log content of each line, and the automatic parsing method improves the parsing efficiency of the log file.

Description

technical field [0001] The invention belongs to the technical field of data analysis, and in particular relates to a log file parsing method, device, medium and computer equipment. Background technique [0002] In the Android system, during the development and testing of each application, a large amount of log information is generated, such as warning log information, fault log information, and so on. Then if there is a crash or other failure problems, you can find the corresponding log information to determine the corresponding cause of the failure, so as to eliminate the bug. [0003] In the prior art, various Android log information is usually mixed together, and the log files are generally analyzed and processed manually, which makes it impossible to analyze the log information efficiently and quickly, which not only increases the labor intensity. , and does not ensure analytical efficiency. In addition, during manual analysis and processing, errors will inevitably occ...

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/16
CPCG06F16/1815G06F16/16
Inventor 张磊
Owner 武汉斗鱼鱼乐网络科技有限公司