CN113515683A - Log capture method, device, equipment and storage medium - Google Patents

Log capture method, device, equipment and storage medium Download PDF

Info

Publication number
CN113515683A
CN113515683A CN202110781964.4A CN202110781964A CN113515683A CN 113515683 A CN113515683 A CN 113515683A CN 202110781964 A CN202110781964 A CN 202110781964A CN 113515683 A CN113515683 A CN 113515683A
Authority
CN
China
Prior art keywords
log
target
instruction
debugging
grabbing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110781964.4A
Other languages
Chinese (zh)
Inventor
邬海文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Skyworth RGB Electronics Co Ltd
Original Assignee
Shenzhen Skyworth RGB Electronics Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Skyworth RGB Electronics Co Ltd filed Critical Shenzhen Skyworth RGB Electronics Co Ltd
Priority to CN202110781964.4A priority Critical patent/CN113515683A/en
Publication of CN113515683A publication Critical patent/CN113515683A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/951Indexing; Web crawling techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/1805Append-only file systems, e.g. using logs or journals to store data
    • G06F16/1815Journaling file systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention belongs to the technical field of log processing and discloses a log capturing method, a log capturing device, log capturing equipment and a log storing medium. The method comprises the following steps: acquiring a grabbing instruction of a user; determining a corresponding target debugging object according to the grabbing instruction; selecting a corresponding printing grade in a target system selection frame in a target debugging object based on the grabbing instruction; and executing a corresponding target debugging instruction according to the printing grade to obtain a target capture log. By the mode, different debugging objects are determined according to the user instruction, the corresponding printing grades are selected according to the grabbing instruction after the target debugging objects are determined, the corresponding target logs are grabbed, the debugging instruction is packaged by adopting a graphical interface, the grabbing efficiency is improved, meanwhile, logs of different grades can be printed, the grabbing process is simplified, the logs can be grabbed even if the debugging instruction is unfamiliar, and the working efficiency of a user is greatly improved.

Description

Log capture method, device, equipment and storage medium
Technical Field
The invention relates to the technical field of log processing, in particular to a log capturing method, a log capturing device, log capturing equipment and a log storing medium.
Background
With android becoming the world's first-occupied operating system. Android already has over 2000 ten thousand developers, and it is an important ring for a developer to grab a system during debugging, the current application developer generally uses a self-contained system log tool of Android studio, and the system developer generally grabs the system log through adb (Android Debug Bridge), and the two modes can grab the system log, but have two problems, the former can consume computer performance during grabbing, and cannot grab a kernel log and a program time log in the system log, and the latter has low efficiency during grabbing and has strong professional requirements on users.
The above is only for the purpose of assisting understanding of the technical aspects of the present invention, and does not represent an admission that the above is prior art.
Disclosure of Invention
The invention mainly aims to provide a log capturing method, a log capturing device, log capturing equipment and a log capturing storage medium, and aims to solve the technical problems that in the prior art, capturing efficiency is low, and functions are incomplete and complicated.
In order to achieve the above object, the present invention provides a log crawling method, comprising the following steps:
acquiring a grabbing instruction of a user;
determining a corresponding target debugging object according to the grabbing instruction;
selecting a corresponding printing grade in a target system selection frame in a target debugging object based on the grabbing instruction;
and executing a corresponding target debugging instruction according to the printing grade to obtain a target capture log.
Optionally, the selecting, based on the grab instruction, a corresponding print level in a target system selection box in a target debugging object includes:
if the target debugging object is a target debugging process, selecting a corresponding printing grade in a first target selection frame according to the grabbing instruction;
wherein the printing level in the first target selection box includes a detailed information log, a debug log, a general information log, an error log, and a warning log.
Optionally, the selecting, based on the grab instruction, a corresponding print level in a target system selection box in a target debugging object includes:
if the target debugging object is a target debugging system, selecting a corresponding printing grade in a second target selection box according to the grabbing instruction;
wherein the print level in the second target selection box comprises an event log and a kernel log.
Optionally, the determining a corresponding target debug object according to the grab instruction includes:
searching for terminal equipment corresponding to the equipment information in an online state in a target monitor;
and determining corresponding target terminal equipment and a corresponding target debugging object in the target terminal equipment in the terminal equipment corresponding to the online state according to the grabbing instruction.
Optionally, before searching for the terminal device corresponding to the device information in the online state in the target listener, the method further includes:
acquiring a connection instruction of the terminal equipment;
acquiring equipment information corresponding to the terminal equipment according to the connection instruction;
creating a target listener;
and storing the equipment information into the target listener.
Optionally, after the corresponding target debugging instruction is executed according to the printing grade to obtain the target capture log, the method further includes:
storing the target capture log as a storage log into a preset text box;
acquiring an operation instruction of a user;
and processing the storage log according to the operation instruction.
Optionally, the processing the storage log according to the operation instruction includes:
if the operation instruction is a query instruction, searching a corresponding target query log in the storage log through a preset matching model according to the query instruction, and displaying the target query log in a preset display mode;
if the operation instruction is a clearing instruction, clearing the storage log from the cache area and the display area corresponding to the preset text box according to the clearing instruction;
and if the operation instruction is a saving instruction, saving the storage log to a target storage position according to the saving instruction.
In addition, in order to achieve the above object, the present invention further provides a log capture apparatus, including:
an acquisition module: the system comprises a data acquisition module, a data acquisition module and a data processing module, wherein the data acquisition module is used for acquiring a grabbing instruction of a user;
a determination module: the target debugging object is used for determining a corresponding target debugging object according to the grabbing instruction;
a selection module: the system comprises a target system selection box, a target debugging object and a printing module, wherein the target system selection box is used for selecting a corresponding printing grade in the target system selection box in the target debugging object based on the grabbing instruction;
an execution module: and executing a corresponding target debugging instruction according to the printing grade to obtain a target capture log.
In addition, in order to achieve the above object, the present invention further provides a log capture device, including: a memory, a processor and a log crawling program stored on the memory and executable on the processor, the log crawling program being configured to implement the steps of the log crawling method as described above.
In addition, to achieve the above object, the present invention further provides a storage medium, which stores a log fetching program, and the log fetching program, when executed by a processor, implements the steps of the log fetching method as described above
The invention acquires the grabbing instruction of the user; determining a corresponding target debugging object according to the grabbing instruction; selecting a corresponding printing grade in a target system selection frame in a target debugging object based on the grabbing instruction; and executing a corresponding target debugging instruction according to the printing grade to obtain a target capture log. By the mode, different debugging objects are determined according to the user instruction, the corresponding printing grades are selected according to the grabbing instruction after the target debugging objects are determined, the corresponding target logs are grabbed, the debugging instruction is packaged by adopting a graphical interface, the grabbing efficiency is improved, meanwhile, logs of different grades can be printed, the grabbing process is simplified, the logs can be grabbed even if the debugging instruction is unfamiliar, and the working efficiency of a user is greatly improved.
Drawings
FIG. 1 is a schematic structural diagram of a log crawling apparatus of a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a log crawling method according to a first embodiment of the present invention;
FIG. 3 is a flowchart illustrating a log crawling method according to a second embodiment of the present invention;
FIG. 4 is a schematic overall flowchart of an embodiment of a log capture method according to the present invention
Fig. 5 is a block diagram of a first embodiment of the log crawling apparatus according to the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a log crawling device in a hardware operating environment according to an embodiment of the present invention.
As shown in fig. 1, the log crawling apparatus may include: a processor 1001, such as a Central Processing Unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a Wireless interface (e.g., a Wireless-Fidelity (Wi-Fi) interface). The Memory 1005 may be a Random Access Memory (RAM) Memory, or may be a Non-Volatile Memory (NVM), such as a disk Memory. The memory 1005 may alternatively be a storage device separate from the processor 1001.
Those skilled in the art will appreciate that the configuration shown in fig. 1 does not constitute a limitation of the log capture device and may include more or fewer components than shown, or some components in combination, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a storage medium, may include therein an operating system, a network communication module, a user interface module, and a log ripping program.
In the log scraping apparatus shown in fig. 1, the network interface 1004 is mainly used for data communication with a network server; the user interface 1003 is mainly used for data interaction with a user; the processor 1001 and the memory 1005 in the log capture device of the present invention may be disposed in the log capture device, and the log capture device calls the log capture program stored in the memory 1005 through the processor 1001 and executes the log capture method provided by the embodiment of the present invention.
An embodiment of the present invention provides a log capture method, and referring to fig. 2, fig. 2 is a schematic flowchart of a first embodiment of the log capture method according to the present invention.
In this embodiment, the log capture method includes the following steps:
step S10: and acquiring a grabbing instruction of a user.
It should be noted that the execution subject of this embodiment is software developed based on java and using an adb (Android Debug Bridge) instruction to capture a log, where the software is software that mainly captures a system log (log) of an Android device, fully uses a strong function of the adb instruction, visualizes all common instructions, and captures the log specially, and the software is not limited by a platform, and can run in all computers installed with an jre environment.
It should be noted that the instruction for grabbing by the user includes a target debug object and a target grab log of the user. Before capturing the log, a capturing instruction of the user needs to be acquired, and the corresponding target can be determined.
Step S20: and determining a corresponding target debugging object according to the grabbing instruction.
It should be noted that the target debugging object includes a target debugging process and a target debugging system.
It can be understood that, when the target debugging object is a debugging process, the system lists the currently running processes, and then selects a corresponding target debugging process in the currently running processes according to the needs of the user.
In a specific implementation, in order to improve the efficiency of fetching, filtering to obtain an object that can be normally debugged before determining a target debug object, and further, determining a corresponding target debug object according to the fetching instruction includes: searching for terminal equipment corresponding to the equipment information in an online state in a target monitor; and determining corresponding target terminal equipment and a corresponding target debugging object in the target terminal equipment in the terminal equipment corresponding to the online state according to the grabbing instruction.
It should be noted that the target listener refers to a listener deviceisserene registered at software startup, and is used as the target listener.
It can be understood that the device information refers to device information corresponding to a terminal device plugged into a computer, and the device information includes, but is not limited to, a name and an ID of the terminal device and an online status of the terminal device.
It should be understood that, after the terminal device is inserted, the terminal device corresponding to the current online state is determined, a corresponding target debugging terminal is determined in the online terminal device according to a capture instruction of a user, and a target debugging object is selected in the target debugging terminal.
In a specific implementation, in order to accurately identify whether the current terminal device is online, further, before searching for a terminal device corresponding to the device information in the online state in the target listener, the method further includes: acquiring a connection instruction of the terminal equipment; acquiring equipment information corresponding to the terminal equipment according to the connection instruction; creating a target listener; and storing the equipment information into the target listener.
It should be noted that, when a terminal device requests to be inserted into a computer, a connection instruction of the terminal device is obtained, device information of the terminal device is obtained according to the connection instruction, when a user needs to capture a log, capture software is started, at this time, a listener deviceisener is created and registered as a target listener after the software is started, and the device information of the terminal device is stored in the target listener List < DeviceInfo (device information) > which includes, but is not limited to, a name and an ID of the terminal device and an online state of the terminal device.
In a specific implementation, after the connection instruction of the terminal device is obtained, the terminal device information carried by the terminal device needs to be identified and filtered, whether the current device information contains dangerous information or not is judged, and if the current device information contains dangerous information, the connection request of the device is rejected.
Step S30: and selecting a corresponding printing grade in a target system selection box in a target debugging object based on the grabbing instruction.
It should be noted that the target system selection frame has different print grades for different target debug objects, and after the capture instruction of the user is obtained, the print grade required by the user is selected in the target system selection frame according to the capture instruction of the user.
Step S40: and executing a corresponding target debugging instruction according to the printing grade to obtain a target capture log.
It should be noted that the different printing grades correspond to different debugging instructions, and after the printing grade of the user is obtained according to the capture instruction of the user, the software system can automatically determine and execute the corresponding target debugging instruction to obtain the corresponding target capture log.
In a specific implementation, in order to facilitate analysis and search of a log of a user, further, after the corresponding target debugging instruction is executed according to the printing level to obtain a target capture log, the method further includes: storing the target capture log as a storage log into a preset text box; acquiring an operation instruction of a user; and processing the storage log according to the operation instruction.
It should be noted that the preset text box is used to store the captured log, and the operation instruction of the user includes searching the keyword log, clearing the log, and saving the log.
It can be understood that after the captured log is obtained, the user may find the corresponding log in the text viewing field, i.e., the preset text box, and perform a certain operation on the log, so that an operation instruction of the user needs to be obtained, and perform corresponding operation processing on the log stored in the preset text box according to the operation instruction, for example, finding a keyword log, clearing the log, and saving the log.
In a specific implementation, in order to more accurately execute an operation instruction of a user, further, the processing the storage log according to the operation instruction includes: if the operation instruction is a query instruction, searching a corresponding target query log in the storage log through a preset matching model according to the query instruction, and displaying the target query log in a preset display mode; if the operation instruction is a clearing instruction, clearing the storage log from the cache area and the display area corresponding to the preset text box according to the clearing instruction; and if the operation instruction is a saving instruction, saving the storage log to a target storage position according to the saving instruction.
It should be noted that, when the operation instruction of the user is a query instruction, a keyword needs to be input in a filter column of a preset text box according to the query instruction of the user, a corresponding keyword log is found in a storage log as a target query log through a preset matching model, and the keyword is displayed in a preset display mode, where the preset display mode is that the keyword is highlighted or the keyword is identified by a black box for display, and the preset matching model is obtained by inputting characters or numbers to be queried in the filter column and performing matching training through a KMP algorithm.
It can be understood that, when the operation instruction of the user is a clearing instruction, the log is required to be completely cleared from the cache area of the preset text box according to the clearing instruction of the user, and the logcat-c command is executed to clear the log of the display area device.
In a specific implementation, when the operation instruction of the user is a save instruction, all logs in the preset textbox cache area need to be saved to a specified directory, that is, a target storage location, through an IO stream of java according to the save instruction of the user.
In the embodiment, a grabbing instruction of a user is obtained; determining a corresponding target debugging object according to the grabbing instruction; selecting a corresponding printing grade in a target system selection frame in a target debugging object based on the grabbing instruction; and executing a corresponding target debugging instruction according to the printing grade to obtain a target capture log. By the mode, different debugging objects are determined according to the user instruction, the corresponding printing grades are selected according to the grabbing instruction after the target debugging objects are determined, the corresponding target logs are grabbed, the debugging instruction is packaged by adopting a graphical interface, the grabbing efficiency is improved, meanwhile, logs of different grades can be printed, the grabbing process is simplified, the logs can be grabbed even if the debugging instruction is unfamiliar, and the working efficiency of a user is greatly improved.
Referring to fig. 3, fig. 3 is a flowchart illustrating a log crawling method according to a second embodiment of the present invention.
Based on the first embodiment, step S30 in the log crawling method of this embodiment includes:
step S301: and if the target debugging object is a target debugging process, selecting a corresponding printing grade in a first target selection frame according to the grabbing instruction.
It should be noted that, if the grab instruction of the user is a debugging process, a normally running process in the system needs to be filtered through ps-e before the target debugging process of the user is selected, and then the target debugging process of the user is selected in the normally running process.
It can be understood that after the target debugging process is selected, the process identification number, i.e. pid, of the target debugging process is recorded, the first target selection box has options of different printing grades, and then the corresponding printing grade is selected in the first target selection box as the target printing grade selected in the first target selection box required by the user.
Step S302: wherein the printing level in the first target selection box includes a detailed information log, a debug log, a general information log, an error log, and a warning log.
It should be noted that, the first target selection box printing level has the following options: the system comprises a detailed information log, namely Verboot, a debugging log, namely Debug, a general information log, namely Info, an Error log, namely Error, and an alarm log, namely Warn.
In a specific implementation, when the printing grade selected by the user is Verbose, the system executes log cat-v time | grep pid; selecting Debug, and executing logcat-v time by the system, wherein D | grep pid is the logic of Debug; selecting Info, performing logcat-v time I | grep pid; selecting Error, and executing logcat-v time E | grep pid; warn is selected and logcat-v time W | grep pid is executed.
In a specific implementation, in order to obtain a more comprehensive log, including a kernel log and an event log, further, the selecting, based on the fetching instruction, a corresponding print level in a target system selection box in a target debug object includes: if the target debugging object is a target debugging system, selecting a corresponding printing grade in a second target selection box according to the grabbing instruction; wherein the print level in the second target selection box comprises an event log and a kernel log.
It should be noted that, if the user's grab instruction is to debug the system, the second target selection box of the "system log" will provide two options of printing levels, and then the corresponding response level, including kernel log or event log, is selected in the second target selection box according to the user's grab instruction.
It is understood that when the print level selected by the user is kernellog, the command cat/dev/kmsg-n > kernel. When the printing grade selected by the user is eventlog, the command adb logcat-v thread time-t 4096-b events is executed, and simultaneously, the user can check all the life cycle information of the activity through the secondary command.
In a specific implementation, as shown in fig. 4, when software detects that a device is plugged into a computer, relevant device information corresponding to the terminal device, including a DeviceName, a DeviceID, and a DeviceStatus of the terminal device, is stored in a target listener, when a target debugging object of a user selects a debugging process, the system lists a process currently running normally, then the user selects the target debugging process in the process running normally, after selecting the process, different printing grades (Verbose, Debug, Info, Error, and Warn) can be selected in a first target selection box, when the target debugging object of the user is a debugging system, different printing grades eventlog or kernellog are selected in a second target selection box, all logs are output to a cache area of a preset text box, and positioning, storing, and clearing of keywords are supported in the preset text box.
In this embodiment, if the target debugging object is a target debugging process, selecting a corresponding printing grade in a first target selection box according to the capture instruction; wherein the printing level in the first target selection box includes a detailed information log, a debug log, a general information log, an error log, and a warning log. And the corresponding target log is selectively captured according to the capture instruction, and the adb instruction is encapsulated, so that the capture process is simpler, more convenient and more comprehensive, and the working efficiency is improved.
In addition, referring to fig. 5, an embodiment of the present invention further provides a log crawling apparatus, where the log crawling apparatus includes:
and the acquisition module 10 is used for acquiring a grabbing instruction of a user.
And the determining module 20 is configured to determine a corresponding target debugging object according to the grab instruction.
And the selection module 30 is used for selecting a corresponding printing grade in a target system selection box in the target debugging object based on the grabbing instruction.
And the execution module 40 executes the corresponding target debugging instruction according to the printing grade to obtain a target capture log.
In the embodiment, a grabbing instruction of a user is obtained; determining a corresponding target debugging object according to the grabbing instruction; selecting a corresponding printing grade in a target system selection frame in a target debugging object based on the grabbing instruction; and executing a corresponding target debugging instruction according to the printing grade to obtain a target capture log. By the mode, different debugging objects are determined according to the user instruction, the corresponding printing grades are selected according to the grabbing instruction after the target debugging objects are determined, the corresponding target logs are grabbed, the debugging instruction is packaged by adopting a graphical interface, the grabbing efficiency is improved, meanwhile, logs of different grades can be printed, the grabbing process is simplified, the logs can be grabbed even if the debugging instruction is unfamiliar, and the working efficiency of a user is greatly improved.
In an embodiment, the selecting module 30 is further configured to select a corresponding printing grade in the first target selection box according to the fetching instruction if the target debugging object is a target debugging process;
wherein the printing level in the first target selection box includes a detailed information log, a debug log, a general information log, an error log, and a warning log.
In an embodiment, the selecting module 30 is further configured to select a corresponding printing grade in a second target selection box according to the capture instruction if the target debugging object is a target debugging system;
wherein the print level in the second target selection box comprises an event log and a kernel log.
In an embodiment, the determining module 20 is further configured to search, in the target listener, for a terminal device whose device information corresponds to an online state;
and determining corresponding target terminal equipment and a corresponding target debugging object in the target terminal equipment in the terminal equipment corresponding to the online state according to the grabbing instruction.
In an embodiment, the determining module 20 is further configured to obtain a connection instruction of the terminal device;
acquiring equipment information corresponding to the terminal equipment according to the connection instruction;
creating a target listener;
and storing the equipment information into the target listener.
In an embodiment, the executing module 40 is further configured to store the target capture log as a storage log in a preset text box;
acquiring an operation instruction of a user;
and processing the storage log according to the operation instruction.
In an embodiment, the execution module 40 is further configured to, if the operation instruction is a query instruction, search a corresponding target query log in the stored log through a preset matching model according to the query instruction, and display the target query log in a preset display manner;
if the operation instruction is a clearing instruction, clearing the storage log from the cache area and the display area corresponding to the preset text box according to the clearing instruction;
and if the operation instruction is a saving instruction, saving the storage log to a target storage position according to the saving instruction.
Since the present apparatus employs all technical solutions of all the above embodiments, at least all the beneficial effects brought by the technical solutions of the above embodiments are achieved, and are not described in detail herein.
In addition, an embodiment of the present invention further provides a storage medium, where a log capture program is stored on the storage medium, and the log capture program, when executed by a processor, implements the steps of the log capture method described above.
Since the storage medium adopts all technical solutions of all the embodiments, at least all the beneficial effects brought by the technical solutions of the embodiments are achieved, and no further description is given here.
It should be noted that the above-described work flows are only exemplary, and do not limit the scope of the present invention, and in practical applications, a person skilled in the art may select some or all of them to achieve the purpose of the solution of the embodiment according to actual needs, and the present invention is not limited herein.
In addition, the technical details that are not described in detail in this embodiment may refer to the log capture method provided in any embodiment of the present invention, and are not described herein again.
Further, it is to be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention or portions thereof that contribute to the prior art may be embodied in the form of a software product, where the computer software product is stored in a storage medium (e.g. Read Only Memory (ROM)/RAM, magnetic disk, optical disk), and includes several instructions for enabling a terminal device (e.g. a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A log crawling method is characterized by comprising the following steps:
acquiring a grabbing instruction of a user;
determining a corresponding target debugging object according to the grabbing instruction;
selecting a corresponding printing grade in a target system selection frame in a target debugging object based on the grabbing instruction;
and executing a corresponding target debugging instruction according to the printing grade to obtain a target capture log.
2. The log scraping method as recited in claim 1, wherein the selecting a corresponding print level in a target system selection box in a target debug object based on the scraping instruction comprises:
if the target debugging object is a target debugging process, selecting a corresponding printing grade in a first target selection frame according to the grabbing instruction;
wherein the printing level in the first target selection box includes a detailed information log, a debug log, a general information log, an error log, and a warning log.
3. The log scraping method as recited in claim 1, wherein the selecting a corresponding print level in a target system selection box in a target debug object based on the scraping instruction comprises:
if the target debugging object is a target debugging system, selecting a corresponding printing grade in a second target selection box according to the grabbing instruction;
wherein the print level in the second target selection box comprises an event log and a kernel log.
4. The log scraping method of claim 1, wherein the determining a corresponding target debug object according to the scraping instruction comprises:
searching for terminal equipment corresponding to the equipment information in an online state in a target monitor;
and determining corresponding target terminal equipment and a corresponding target debugging object in the target terminal equipment in the terminal equipment corresponding to the online state according to the grabbing instruction.
5. The log scraping method of claim 4, wherein before the searching for the terminal device corresponding to the device information in the target listener in the online state, the method further comprises:
acquiring a connection instruction of the terminal equipment;
acquiring equipment information corresponding to the terminal equipment according to the connection instruction;
creating a target listener;
and storing the equipment information into the target listener.
6. The log scraping method according to any one of claims 1 to 5, wherein after the corresponding target debugging instruction is executed according to the printing level to obtain a target scraping log, the method further comprises:
storing the target capture log as a storage log into a preset text box;
acquiring an operation instruction of a user;
and processing the storage log according to the operation instruction.
7. The log scraping method of claim 6, wherein the processing the stored log according to the operation instruction comprises:
if the operation instruction is a query instruction, searching a corresponding target query log in the storage log through a preset matching model according to the query instruction, and displaying the target query log in a preset display mode;
if the operation instruction is a clearing instruction, clearing the storage log from the cache area and the display area corresponding to the preset text box according to the clearing instruction;
and if the operation instruction is a saving instruction, saving the storage log to a target storage position according to the saving instruction.
8. A log crawling apparatus, comprising:
an acquisition module: the system comprises a data acquisition module, a data acquisition module and a data processing module, wherein the data acquisition module is used for acquiring a grabbing instruction of a user;
a determination module: the target debugging object is used for determining a corresponding target debugging object according to the grabbing instruction;
a selection module: the system comprises a target system selection box, a target debugging object and a printing module, wherein the target system selection box is used for selecting a corresponding printing grade in the target system selection box in the target debugging object based on the grabbing instruction;
an execution module: and executing a corresponding target debugging instruction according to the printing grade to obtain a target capture log.
9. A log crawling apparatus, characterized in that the apparatus comprises: a memory, a processor, and a log crawling program stored on the memory and executable on the processor, the log crawling program configured to implement the log crawling method according to any one of claims 1 to 7.
10. A storage medium having stored thereon a log ripping program that, when executed by a processor, implements the log ripping method according to any one of claims 1 to 7.
CN202110781964.4A 2021-07-09 2021-07-09 Log capture method, device, equipment and storage medium Pending CN113515683A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110781964.4A CN113515683A (en) 2021-07-09 2021-07-09 Log capture method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110781964.4A CN113515683A (en) 2021-07-09 2021-07-09 Log capture method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113515683A true CN113515683A (en) 2021-10-19

Family

ID=78067206

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110781964.4A Pending CN113515683A (en) 2021-07-09 2021-07-09 Log capture method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113515683A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115333929A (en) * 2022-07-14 2022-11-11 深圳市大头兄弟科技有限公司 Log early warning method based on cluster and related equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108153647A (en) * 2017-12-26 2018-06-12 广东欧珀移动通信有限公司 log processing method, device, terminal device and storage medium
WO2021012489A1 (en) * 2019-07-22 2021-01-28 平安科技(深圳)有限公司 Telephone platform log query method, terminal device, storage medium and apparatus
CN112783724A (en) * 2021-01-26 2021-05-11 上海商米科技集团股份有限公司 Log capture debugging method and system, intelligent device and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108153647A (en) * 2017-12-26 2018-06-12 广东欧珀移动通信有限公司 log processing method, device, terminal device and storage medium
WO2021012489A1 (en) * 2019-07-22 2021-01-28 平安科技(深圳)有限公司 Telephone platform log query method, terminal device, storage medium and apparatus
CN112783724A (en) * 2021-01-26 2021-05-11 上海商米科技集团股份有限公司 Log capture debugging method and system, intelligent device and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115333929A (en) * 2022-07-14 2022-11-11 深圳市大头兄弟科技有限公司 Log early warning method based on cluster and related equipment

Similar Documents

Publication Publication Date Title
CN106844136B (en) Method and system for collecting program crash information
US6021437A (en) Process and system for real-time monitoring of a data processing system for its administration and maintenance support in the operating phase
CN102591696A (en) Method and system for extracting behavioral data of mobile phone software
CN110765464A (en) Vulnerability detection method, device, equipment and computer storage medium
CN111475390A (en) Log collection system deployment method, device, equipment and storage medium
JP6163707B2 (en) Embedded device, program creation device, program
CN112148606B (en) Buried point test method, buried point test device, buried point test equipment and computer readable medium
CN113515683A (en) Log capture method, device, equipment and storage medium
CN115543827A (en) Buried point data display method and device
CN116893945A (en) Operation and maintenance cloud platform service early warning method, system and device
CN112416762B (en) API test method and device, equipment and computer readable storage medium
JP2010237841A (en) Device and program for operation verification
CN110231921B (en) Log printing method, device, equipment and computer readable storage medium
CN107656849B (en) Method and device for positioning performance problem of software system
CN112100061A (en) Visual crawler code compiling and debugging method
CN115794583A (en) Kernel analysis method and device
US20230131682A1 (en) Facilitated live analysis of screen content
CN115543759A (en) Log lookup method and device for operating system, electronic device and storage medium
CN113094240B (en) Abnormality monitoring method for application program, mobile terminal and storage medium
CN110601879B (en) Method and device for forming Zabbix alarm process information and storage medium
CN115016775A (en) Interface simulation method and device, storage medium and electronic equipment
JP2005332030A (en) Controller
CN115220859A (en) Data input mode monitoring method and device, electronic equipment and storage medium
CN114398290A (en) Program debugging method, device, equipment and medium
JP2002229816A (en) Fault information acquiring system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination