Log recording method and device, terminal device and readable storage medium
A recording method and log technology, which is applied in the field of vehicle diagnosis, can solve the problem that the vehicle diagnosis method cannot accurately determine the cause of the fault, and achieve the effect of improving efficiency
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0072] figure 1 A schematic flow chart of the log recording method provided by the present application is shown, which is used as an example but not limited, and the method can be applied to the above-mentioned notebook computer.
[0073] 101. Analyze the PDU construction interface parameters corresponding to the PDU construction function, and obtain the log status parameter and log storage path carried by the PDU construction interface parameters.
[0074] Specifically, analyze the PDU construction interface parameter Optionstr (specifically in the form of a string) corresponding to the PDU construction function of the general D-PDU API (Diagnostic protocol data unit) diagnostic protocol data unit application program interface, and obtain the PDU construction interface parameter carrying The log state parameter and log save path of the log record function. Wherein, the log status parameter refers to a parameter that controls the working status of the log recording function. ...
Embodiment 2
[0103] This embodiment is a further description of Embodiment 1. For the same or similar parts as Embodiment 1, please refer to the relevant description of Embodiment 1 for details, and details will not be repeated here. Such as figure 2 As shown, the method also includes:
[0104] S201. When receiving a path change instruction, call the PDU constructor based on the path change instruction to obtain a corresponding new storage path;
[0105] S202. When a new log file is detected, save the new log file to the new storage path;
[0106] S203. Save all log files stored in the log storage path to the new log storage path, and delete all log files in the log storage path.
[0107] Specifically, when the path change instruction sent by the user is received, the PDU constructor of the general D-PDUAPI (Diagnostic protocol data unit) diagnostic protocol data unit application program interface is called based on the path change instruction to obtain the corresponding new storage path ...
Embodiment 3
[0114] This embodiment is a further description of Embodiment 1. For the same or similar parts as Embodiment 1, please refer to the relevant description of Embodiment 1 for details, and details will not be repeated here. Such as image 3 As shown, in this embodiment, when the log state parameter is detected to be started, start the log recording function, generate a log file and save it in the log storage path, and further include:
[0115] S104. Obtain the calling time of the PDU constructor;
[0116] S105. Generate the name of the log file according to the calling time.
[0117] Specifically, when the log recording function is started, the time point of calling the PDU constructor is obtained, and the name of the log file is generated according to the calling time point.
[0118] For example, the time to call the PDU constructor is 10:10 on August 1, 2021, and the corresponding log file name is 2021813101000-DPDU-LOG.txt.
[0119] In an embodiment, the name of the log fil...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


