Operation log generation method and device and fault query method and device
A log and fault technology, applied in the computer field, can solve problems such as troubleshooting of fault points, difficulty in repairing operation and maintenance, difficulty in automatic processing, workload, etc., to achieve the effect of simple calling process, convenient processing, and strong applicability
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Publication Date
- 2022-02-18
Smart Images

Figure 1 
Figure 2 
Figure 3
Abstract
Description
technical field
[0001] The embodiments of the present invention relate to the field of computer technology, and in particular to an operation log generation method, a fault query method and a device. Background technique
[0002] With the development of information technology, the business scope of the Internet has become wider and wider, involving more and more services. Faced with the challenges of many manpower and time costs, the requirements of security audits, and the pressure of development, maintenance and operation. The public libraries used in the development of various service projects have security audit requirements, and their functions involving sensitive and security issues need to be audited to comply with security specifications. The operation logs of each product line need to be maintained in a unified manner. When developing new functions, there is a unified functional testing requirement, and it is expected to know whether the function's parameter passi...
Examples
Embodiment 1
[0033] figure 1 A schematic flowchart of a method for generating an operation log provided in Embodiment 1 of the present application is given, and the method is suitable for recording operations when any operation is performed during the development process. The method can be executed by a computer device configured with a python operating environment, and the computer device can be composed of two or more physical entities, or can be composed of one physical entity. Generally speaking, the computer equipment may be a notebook, a desktop computer, a smart tablet, and the like.
[0034] Such as figure 1 As shown, a method for generating an operation log provided in Embodiment 1 specifically includes the following steps:
[0035] S101. Receive an operation to be executed, and generate a global job identifier.
[0036] In this embodiment, the operation to be performed may specifically be understood as an operation that needs to be performed by a computer, for example, creatin...
Embodiment 2
[0049] figure 2 It is a flow chart of a method for generating an operation log provided by Embodiment 2 of the present invention. The technical solution of this embodiment is further refined on the basis of the above-mentioned technical solution, and specifically mainly includes the following steps:
[0050] S201. Receive an operation to be executed, and generate a job global identifier.
[0051] S202. Call the parsing function to parse the operation to be executed.
[0052] In this embodiment, the parsing function may specifically be understood as a function for parsing codes, character strings, and the like. Perform data analysis on the operation to be executed by calling the analysis function.
[0053] S203. Determine at least one job to be executed according to the parsing result.
[0054] Taking the operation to be executed as creating 3 virtual machines as an example, by calling the analysis function to perform data analysis on the operation to be executed, the obta...
Embodiment 3
[0106] Figure 5 It is a flowchart of a fault query method provided by Embodiment 3 of the present invention, the method includes:
[0107] S501. Obtain a job identifier to be queried and an operation log, where the operation log is generated by the method for generating an operation log in any embodiment of the present invention.
[0108] In this embodiment, the job ID to be queried can specifically be understood as a job ID with a query requirement. When performing troubleshooting or security audit, the user can input the ID of the job to be queried according to the requirement. The execution device of the present application obtains the job identifier to be queried, and obtains the operation log from the database.
[0109] S502. Query the task table in the operation log according to the job identifier to be queried, and determine the fault information.
[0110] In this embodiment, the fault information may include whether a fault occurs, the location of the fault when th...