Abnormity detection method and device for log tracking module

By sending control information to the log tracking module and outputting internal log files through the application process, the problem of not being able to accurately know the abnormality of the log tracking module is solved, and the reliability of the application process log printing is ensured.

CN118940181APending Publication Date: 2024-11-12NEUSOFT REACH AUTOMOBILE TECH (SHENYANG) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411014835.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-26
Publication Date
2024-11-12

AI Technical Summary

Technical Problem

In the prior art, the log tracking module exception cannot be accurately known, which affects the reliability of application process log printing.

Method used

Through the application process, the control information is sent to the log tracking module, the target information is determined and saved to the internal log queue, the log thread outputs internal log files, and the exceptions of the log tracking module are detected.

Benefits of technology

It realizes accurate detection of abnormalities of the log tracking module, ensuring the reliability of application process log printing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118940181A_ABST
    Figure CN118940181A_ABST
Patent Text Reader

Abstract

The invention provides an anomaly detection method and device for a log tracking module, and relates to the technical field of in-vehicle log tracking anomaly detection.The anomaly detection method comprises the steps that target information of a current application process is determined according to control information sent by the current application process to the log tracking module; storing the target information in an internal log queue corresponding to the current application process; when it is monitored that the target information exists in the internal log queue, triggering a log thread to read the target information from the internal log queue, and outputting an internal log file; printing an internal log file, and detecting the abnormality of the log tracking module; the technical problem that in the prior art, the abnormity of a log tracking module cannot be accurately known, and then application process log printing is affected is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of abnormality detection of vehicle log tracking, and in particular to an abnormality detection method and device for a log tracking module. Background Art

[0002] The Adaptive Platform (AUTOSAR AP) middleware is widely used in vehicle-mounted ECU devices. The AUTOSAR AP log and trace (LT) module is used for each application to print (output) log information during operation. Therefore, the LT module is widely used in AUTOSAR AP modules (such as communication management module, execution management module, diagnostic module, platform health management module, etc.) and non-AUTOSAR AP applications.

[0003] Currently, the operation status of each application is generally known by each application calling the LT module interface to print logs, but the LT module cannot print some of its own debugging information and cannot output the LT module's debugging information to the target application; that is, if there is a problem with the LT module itself, there is no effective means to know. Summary of the invention

[0004] In view of this, an object of the present invention is to provide a method and device for detecting anomalies in a log tracking module, so as to alleviate the technical problem in the prior art that anomalies in the log tracking module cannot be accurately detected, thereby affecting the printing of application process logs.

[0005] In a first aspect, an embodiment provides an anomaly detection method for a log tracking module, the method comprising:

[0006] Determine target information of the current application process according to control information sent by the current application process to the log tracking module;

[0007] Saving the target information to the internal log queue corresponding to the current application process;

[0008] When it is detected that the target information exists in the internal log queue, the log thread is triggered to read the target information from the internal log queue and output an internal log file;

[0009] Print the internal log file and detect the abnormality of the log tracking module.

[0010] In an optional implementation, the target information includes debugging information, a log storage path, and a current application process identifier; and the step of determining the target information of the current application process according to the control information sent by the current application process to the log tracking module includes:

[0011] triggering a log tracking module to operate according to first control information received from the current application process;

[0012] Determine a log configuration file of the current application process according to the second control information received from the current application process, and obtain a log storage path of the current application process and a current application process identifier from the log configuration file;

[0013] The debugging information of the log tracking module is determined according to the third control information received from the current application process.

[0014] In an optional implementation, the step of determining the debugging information of the log tracking module according to the third control information received from the current application process includes:

[0015] In response to the third control information sent by the current application process, the log tracking module is controlled to call the first creation interface to create a first log record object, and at the same time, first debugging information sent by the current application process is received, where the first debugging information includes an identifier.

[0016] In an optional implementation, the step of determining the debugging information of the log tracking module according to the third control information received from the current application process includes:

[0017] In response to a user's operation instruction for an adjustment process, controlling the adjustment process to send an adjustment instruction to the current application process;

[0018] According to the adjustment instruction, the current application process is controlled to adjust the log level of the log to be printed, and the second debugging information is sent to the log tracking module through the third control information; wherein the second debugging information includes the command content for adjusting the log level of the log to be printed.

[0019] In an optional implementation, when it is detected that the target information exists in the internal log queue, the step of triggering the log thread to read the target information from the internal log queue and outputting the internal log file includes:

[0020] Detect whether there is an internal log file under the log storage path; wherein the internal log file is a TXT file starting with the current application process identifier;

[0021] If it exists, open the internal log file;

[0022] If it does not exist, create a TXT file starting with the current application process identifier as an internal log file and open it;

[0023] Monitor the target information in the internal log queue in real time through the log thread;

[0024] If detected, the log thread is triggered to read the target information in the internal log queue and output it to the internal log file;

[0025] If it is detected that it does not exist, the log thread is controlled to stop working.

[0026] In an optional implementation, the step of detecting an abnormality of the log tracking module includes:

[0027] Read the log storage path and the current application process identifier from the internal log file, and determine whether there is an error in the log configuration file obtained by the log tracking module;

[0028] Read the first debugging information from the internal log file to determine whether the number of times the log tracking module creates the log record object is incorrect;

[0029] The second debugging information is read from the internal log file to determine whether the content of the adjustment command executed by the log tracking module is incorrect.

[0030] In an optional implementation, the step of printing the internal log file includes:

[0031] The internal log file is printed according to the second log record object created by the log tracking module calling the second creation interface.

[0032] In a second aspect, an embodiment provides an abnormality detection device for a log tracking module, the device comprising:

[0033] A determination module, which determines target information of the current application process according to control information sent by the current application process to the log tracking module;

[0034] A saving module saves the target information to an internal log queue corresponding to the current application process;

[0035] The output module, when detecting that the target information exists in the internal log queue, triggers the log thread to read the target information from the internal log queue and outputs an internal log file;

[0036] The detection module prints the internal log file and detects abnormalities of the log tracking module.

[0037] In a third aspect, an embodiment provides an electronic device, including a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the processor executes the computer program, the steps of the method described in any of the aforementioned implementation methods are implemented.

[0038] In a fourth aspect, an embodiment provides a machine-readable storage medium, wherein the machine-readable storage medium stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement the steps of the method described in any one of the aforementioned implementations.

[0039] An embodiment of the present invention provides an abnormality detection method and device for a log tracking module. Based on the control information sent by the application process to the log tracking module, the target information of each application process that plays a key control role in the log tracking module during the log printing process can be obtained, and the target information is saved in an internal log queue. The log thread outputs the target information in the internal log queue as an internal log file, prints the internal log file, and then it can be known whether there is an abnormality in the log tracking module during the log printing process, thereby ensuring the log printing reliability of each application process.

[0040] Other features and advantages of the present disclosure will be set forth in the following description, or some features and advantages may be inferred or unambiguously determined from the description, or may be learned by implementing the above-mentioned technology of the present disclosure.

[0041] In order to make the above-mentioned objectives, features and advantages of the present disclosure more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0043] Figure 1 A flow chart of an abnormality detection method for a log tracking module provided by an embodiment of the present invention;

[0044] Figure 2 A signaling diagram of an abnormality detection method for a log tracking module provided by an embodiment of the present invention;

[0045] Figure 3 A functional module diagram of an abnormality detection device for a log tracking module provided by an embodiment of the present invention;

[0046] Figure 4 A schematic diagram of the hardware architecture of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0047] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0048] During the current application process log printing process of each ECU in the vehicle, if the log tracking module LT module itself has an abnormality, it will also affect the log printing of each application process. However, when the log printing of the application process is abnormal, it is currently impossible to determine whether it is caused by the abnormality of the LT module, which affects the reliability of the vehicle application log printing.

[0049] Based on this, an embodiment of the present invention provides a method and device for detecting anomalies in a log tracking module. By outputting and printing the internal log file of the log tracking module, it is possible to determine whether the log tracking module is abnormal, thereby alleviating the technical problem in the prior art that the log tracking module anomalies cannot be accurately detected, thereby affecting the printing of application process logs.

[0050] To facilitate understanding of the present embodiment, a method for detecting an abnormality of a log tracking module disclosed in an embodiment of the present invention is first introduced in detail. The method occurs in an application scenario in which vehicles are produced at a vehicle factory; it is specifically applied to each ECU of the vehicle computer; each ECU includes a log tracking module, an adjustment process and multiple application processes; the log output of each application process can be achieved through the log tracking module; the status of the log tracking module during the log printing process can be known by outputting and printing the internal log file, thereby ensuring the reliability of log printing of each application process.

[0051] Figure 1 A flow chart of an anomaly detection method for a log tracking module provided by an embodiment of the present invention.

[0052] like Figure 1 As shown, the method comprises the following steps:

[0053] Step S102: determining target information of the current application process according to control information sent by the current application process to the log tracking module.

[0054] It can be understood that the control information sent to the log tracking module is used to trigger the operation of the log tracking module, and is also used to obtain the target information used by the current application process for log printing; this target information participates in the control application of the log tracking module during the log printing process, that is, based on the record of such target information by the log tracking module during the log printing process, it can be known whether the log tracking module is wrong.

[0055] Step S104, saving the target information to the internal log queue corresponding to the current application process.

[0056] Here, each application process will create an internal log queue when it is started, which is used to store the target information in the steps of the above embodiment. The internal log queue is created when each application process is powered on, destroyed when powered off, and exists throughout the life cycle of each application process.

[0057] Step S106, when it is detected that there is target information in the internal log queue, the log thread is triggered to read the target information from the internal log queue and output the internal log file.

[0058] Based on the above embodiment, each application process creates a corresponding log thread, and the creation timing is the same as the creation timing of the internal log queue, which will not be repeated here; the log thread can monitor the target information stored in the internal log queue and read and generate an internal log file.

[0059] Step S108, printing the internal log file and detecting the abnormality of the log tracking module.

[0060] Here, the output internal log file is printed, and whether there is an abnormality in the log tracking module can be detected based on the internal log file.

[0061] In a preferred embodiment of actual application, based on the control information sent by the application process to the log tracking module, the target information of each application process that plays a key control role in the log tracking module during the log printing process can be obtained, and the target information is saved in the internal log queue. The log thread outputs the target information in the internal log queue as an internal log file, prints the internal log file, and then can determine whether there is an abnormality in the log tracking module during the log printing process. In this way, the log printing reliability of each application process is guaranteed.

[0062] In some embodiments, the target information includes debugging information, log storage path and current application process identifier; according to different control information sent by the current application process to the log tracking module, different target information and triggering of operations are realized. Exemplarily, step S102 may include:

[0063] Step 1.1), triggering the log tracking module to work according to the first control information received from the current application process.

[0064] The first control information may be understood as a control instruction, which triggers the log tracking module to start working and start the log output printing of the current application process.

[0065] Step 1.2), according to the second control information received from the current application process, determine the log configuration file of the current application process, and obtain the log storage path of the current application process and the current application process identifier from the log configuration file.

[0066] Here, according to the second control information, the log tracking module can determine the log configuration file of the current application process, and obtain the path for storing logs of the current application process and the application process identifier from the log configuration file.

[0067] Step 1.3), determining the debugging information of the log tracking module according to the third control information received from the current application process.

[0068] It should be noted that the log tracking module performs debugging operations during the current application process log printing process according to the third control information.

[0069] As an optional embodiment, the debugging information acquisition step in step 1.3) includes:

[0070] Step 1.3.1), in response to the third control information sent by the current application process, the control log tracking module calls the first creation interface to create a first log record object, and receives the first debugging information sent by the current application process, the first debugging information including an identifier.

[0071] Here, each time the log tracking module creates a log record object, it can receive a unique identifier sent by the current application process.

[0072] As another optional embodiment, the debugging information acquisition step in step 1.3) may further include:

[0073] Step 1.3.2), in response to the user's operation instructions for the adjustment process, control the adjustment process to send the adjustment instructions to the current application process; according to the adjustment instructions, control the current application process to adjust the log level of the log to be printed, and send the second debugging information to the log tracking module through the third control information; wherein the second debugging information includes the command content for adjusting the log level of the log to be printed.

[0074] Here, if the car manufacturer user has a log printing demand for a certain application process (current application process), the corresponding operation instruction will be issued to the adjustment process, and the adjustment process will then send the adjustment instruction to the application process to make the current application process modify the log level of the log to be printed in the log configuration file; for example, the log that originally only prints the error level is adjusted to print both the error level and the debug level log; at this time, the command content for adjusting the log level of the log to be printed is used as the second debugging information.

[0075] In the aforementioned embodiment, step S104 creates a queue for storing internal logs through the LT module, then reads the log configuration file of the current application, and parses it to obtain the log storage path and the target application identifier, and saves some debugging information in the queue of the internal log; step S106 can also be implemented by the following steps, including:

[0076] Step 2.1), check whether there is an internal log file in the log storage path.

[0077] The internal log file is a TXT file that starts with the current application process identifier.

[0078] Step 2.2), if it exists, open the internal log file.

[0079] Step 2.3), if it does not exist, create a TXT file starting with the current application process identifier as an internal log file and open it;

[0080] It should be noted that the newly created internal log file is empty at this time.

[0081] For example: the log storage path is / log, and the target application identifier is AVSO, then the LT module will check whether there is an AVSO.txt file in the / log directory. If it exists, it will open the file. If it does not exist, it will create the AVSO.txt file and open it.

[0082] Step 2.4), monitor the target information in the internal log queue in real time through the log thread.

[0083] Here, the log thread is created at the same time as the internal log queue in the steps of the aforementioned embodiment, which will not be repeated here; the log thread monitors in real time whether there is target information in the internal log queue, and triggers corresponding operations of the log thread based on this.

[0084] Step 2.5), if detected, trigger the log thread to read the target information in the internal log queue and output it to the internal log file.

[0085] It should be noted that in this step, the log thread continuously reads the target information from the internal log queue until the target information does not exist in the internal log queue, and the operation of step 2.6) is performed.

[0086] Step 2.6), if it is detected that it does not exist, the control log thread stops working.

[0087] Here, the LT module creates a log thread for processing the internal log queue. The log thread continuously takes out the log messages in the internal log queue and outputs them to the internal log file. When there is no internal log message in the internal log queue, the internal log thread will be blocked and wait for the arrival of new internal log messages.

[0088] In some embodiments, the operation of printing the internal log file in step S108 can be implemented by printing the internal log file based on the second log record object created by the second creation interface called by the log tracking module, specifically including: calling the creation interface CreateLogger function of the LT module based on the target application of the LT module to create a log record Logger object, and then printing the internal log file based on the created Logger object.

[0089] On this basis, it is also possible to know whether the log tracking module is abnormal through the internal log file output and printed in the above embodiment; illustratively, the step of detecting the abnormality of the log tracking module in step S108 includes:

[0090] Step 3.1), read the log storage path and the current application process identifier from the internal log file, and determine whether there is an error in the log configuration file obtained by the log tracking module.

[0091] Among them, by reading the log storage path from the internal log file, it can be judged whether the log configuration file read by the log tracking module is wrong, such as: whether the read log configuration file belongs to the current application process or to other target applications, and then it can be known whether the log tracking module has an abnormality;

[0092] It is also possible to read the contents of the log configuration file from the internal log file, such as the current application process identifier, to determine whether there is an error in the contents of the log configuration file obtained by the log tracking module, and thus to know whether there is an abnormality in the log tracking module;

[0093] If the content of the log configuration file obtained by the log tracking module is incorrect, or the obtained log configuration file does not belong to the current application process, then the log tracking module has a functional abnormality.

[0094] Step 3.2), read the first debugging information from the internal log file to determine whether the creation times of the log record object created by the log tracking module are incorrect; the first debugging information is an identifier.

[0095] Based on the number of unique identifiers obtained by the LT module from the current application and the number of log record Logger objects created, determine whether there is an exception in the log tracking module: for example, if the number of unique identifiers and the number of log record objects actually created do not match, there is an exception in the log tracking module.

[0096] Step 3.3), read the second debugging information from the internal log file to determine whether the content of the adjustment command executed by the log tracking module is wrong. The second debugging information is the content of the adjustment command for the log level of the log to be printed.

[0097] The current application receives the content of the control command sent by the adjustment process dlt-daemon, and then sends it to the log tracking module. The log tracking module prints the received command content for adjusting the log level into the internal log for easy viewing.

[0098] Here, based on the comparison result of the command content for adjusting the log level actually printed in the internal log and the control command for adjusting the process received by the current application, it is determined whether the log tracking module has an abnormality; if the comparison result is inconsistent, the log tracking module has an abnormality.

[0099] In practical applications, a Figure 2 The anomaly detection method of the log tracking module shown includes:

[0100] Trigger the LT module (log tracking module) to work; the LT module creates an internal log queue to store internal logs; the LT module reads the log configuration file of the target application (current application process), and parses the log configuration file of the target application to obtain the log storage path and the target application identifier; outputs the contents of the target application log configuration file to the internal log queue; the LT module checks whether there is a txt file starting with the target application identifier under the log storage path; if it exists, open the file (internal log file); if it does not exist, create the file (internal log file) and open it; the LT module creates an internal log thread for processing the internal log queue; the internal log thread continuously takes out the log messages in the internal log queue and outputs them to the internal In the log file, when there is no internal log message in the internal log queue, the internal log thread will be blocked and wait for the arrival of new internal log messages; the LT module calls the creation interface to create a log record logger object and returns it to the target application; the target application calls the interface of the logger object to print logs and print the internal log file of the LT module; in response to the user's operation instructions issued to the dlt-control tool, the dlt-control tool sends a command to adjust the log level to the dlt-daemon daemon process, and the dlt-daemon daemon process passes the command to adjust the log level to the LT module, and the LT module prints the content of the command to adjust the log level to the internal log; based on the internal log, it is detected whether there is an abnormality in the LT module.

[0101] The embodiment of the present invention adds an internal log function in the LT module, and can output some debugging information of the LT module to a specified file, thereby solving the problem of being unable to determine whether the LT module is abnormal.

[0102] In some embodiments, Figure 3 As shown, the embodiment of the present invention further provides an abnormality detection device 200 for a log tracking module, the device comprising:

[0103] A determination module 201 determines target information of the current application process according to control information sent by the current application process to the log tracking module;

[0104] The saving module 202 saves the target information to the internal log queue corresponding to the current application process;

[0105] The output module 203, when monitoring the existence of the target information in the internal log queue, triggers the log thread to read the target information from the internal log queue and outputs the internal log file;

[0106] The detection module 204 prints the internal log file and detects abnormalities of the log tracking module.

[0107] Furthermore, the target information includes debugging information, log storage path and current application process identifier; the determination module 201 is used to trigger the operation of the log tracking module according to the first control information received from the current application process; determine the log configuration file of the current application process according to the second control information received from the current application process, and obtain the log storage path and current application process identifier of the current application process from the log configuration file; determine the debugging information of the log tracking module according to the third control information received from the current application process.

[0108] Furthermore, the determination module 201 is used to control the log tracking module to call the first creation interface to create the first log record object in response to the third control information sent by the current application process, while receiving the first debugging information sent by the current application process, wherein the first debugging information includes an identifier.

[0109] Furthermore, the determination module 201 is used to respond to the user's operation instructions for the adjustment process, control the adjustment process to send adjustment instructions to the current application process; according to the adjustment instructions, control the current application process to adjust the log level of the log to be printed, and send the second debugging information to the log tracking module through the third control information; wherein, the second debugging information includes the command content for adjusting the log level of the log to be printed.

[0110] Furthermore, the output module 203 is used to detect whether there is an internal log file under the log storage path; wherein the internal log file is a TXT file starting with the current application process identifier; if it exists, the internal log file is opened; if it does not exist, a TXT file starting with the current application process identifier is created as the internal log file and opened; the target information in the internal log queue is monitored in real time through the log thread; if it is detected that it exists, the log thread is triggered to work, the target information in the internal log queue is read, and the target information is output to the internal log file; if it is detected that it does not exist, the log thread is controlled to stop working.

[0111] Furthermore, the detection module 204 is used to read the log storage path and the current application process identifier from the internal log file to determine whether there is an error in the log configuration file obtained by the log tracking module; read the first debugging information from the internal log file to determine whether the creation times of the log record object created by the log tracking module are incorrect; read the second debugging information from the internal log file to determine whether the content of the adjustment command executed by the log tracking module is incorrect.

[0112] Furthermore, the detection module 204 is used to print the internal log file according to the second log record object created by the log tracking module calling the second creation interface.

[0113] Figure 4 Schematic diagram of the hardware architecture of the electronic device 300 provided in an embodiment of the present invention. Figure 4 As shown, the electronic device 300 includes: a machine-readable storage medium 301 and a processor 302, and may also include a non-volatile storage medium 303, a communication interface 304 and a bus 305; wherein the machine-readable storage medium 301, the processor 302, the non-volatile storage medium 303 and the communication interface 304 complete mutual communication through the bus 305. The processor 302 can execute the abnormality detection method of the log tracking module described in the above embodiment by reading and executing the machine-executable instructions of the abnormality detection of the log tracking module in the machine-readable storage medium 301.

[0114] The machine-readable storage medium mentioned in this article can be any electronic, magnetic, optical or other physical storage device that can contain or store information, such as executable instructions, data, etc. For example, the machine-readable storage medium can be: RAM (Radom Access Memory), volatile memory, non-volatile memory, flash memory, storage drive (such as hard disk drive), any type of storage disk (such as CD, DVD, etc.), or similar storage medium, or a combination thereof.

[0115] The non-volatile medium may be a non-volatile memory, a flash memory, a storage drive (such as a hard drive), any type of storage disk (such as a CD, DVD, etc.), or a similar non-volatile storage medium, or a combination thereof.

[0116] It can be understood that the specific operation methods of each functional module in this embodiment can refer to the detailed description of the corresponding steps in the above method embodiment, and will not be repeated here.

[0117] The computer-readable storage medium provided in the embodiment of the present invention stores a computer program. When the computer program code is executed, the anomaly detection method of the log tracking module described in any of the above embodiments can be implemented. The specific implementation can be found in the method embodiment, which will not be repeated here.

[0118] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system and device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0119] In addition, in the description of the embodiments of the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0120] In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.

[0121] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present invention, which are used to illustrate the technical solutions of the present invention rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the aforementioned embodiments, those of ordinary skill in the art should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the aforementioned embodiments within the technical scope disclosed by the present invention, or can easily conceive of changes, or make equivalent replacements for some of the technical features therein. Such modifications, changes or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the protection scope of the present invention.

Claims

1. A log tracking module anomaly detection method, characterized in that: The method comprises: Determine target information of the current application process according to control information sent by the current application process to the log tracking module; Saving the target information to the internal log queue corresponding to the current application process; When it is detected that the target information exists in the internal log queue, the log thread is triggered to read the target information from the internal log queue and output an internal log file; Print the internal log file and detect the abnormality of the log tracking module.

2. The method according to claim 1, characterized in that The target information includes debugging information, log storage path and current application process identifier; The step of determining target information of the current application process according to control information sent by the current application process to the log tracking module includes: triggering a log tracking module to operate according to first control information received from the current application process; Determine a log configuration file of the current application process according to the second control information received from the current application process, and obtain a log storage path of the current application process and a current application process identifier from the log configuration file; The debugging information of the log tracking module is determined according to the third control information received from the current application process.

3. The method according to claim 2, characterized in that The step of determining the debugging information of the log tracking module according to the third control information received from the current application process comprises: In response to the third control information sent by the current application process, the log tracking module is controlled to call the first creation interface to create a first log record object, and at the same time, first debugging information sent by the current application process is received, where the first debugging information includes an identifier.

4. The method according to claim 3, characterized in that The step of determining the debugging information of the log tracking module according to the third control information received from the current application process comprises: In response to a user's operation instruction for an adjustment process, controlling the adjustment process to send an adjustment instruction to the current application process; According to the adjustment instruction, the current application process is controlled to adjust the log level of the log to be printed, and the second debugging information is sent to the log tracking module through the third control information; wherein the second debugging information includes the command content for adjusting the log level of the log to be printed.

5. The method according to claim 2, characterized in that: When it is detected that the target information exists in the internal log queue, the step of triggering the log thread to read the target information from the internal log queue and outputting the internal log file includes: Detect whether there is an internal log file under the log storage path; wherein the internal log file is a TXT file starting with the current application process identifier; If it exists, open the internal log file; If it does not exist, create a TXT file starting with the current application process identifier as an internal log file and open it; Monitor the target information in the internal log queue in real time through the log thread; If detected, the log thread is triggered to read the target information in the internal log queue and output it to the internal log file; If it is detected that it does not exist, the log thread is controlled to stop working.

6. The method according to claim 4, characterized in that The step of detecting an abnormality of the log tracking module includes: Read the log storage path and the current application process identifier from the internal log file, and determine whether there is an error in the log configuration file obtained by the log tracking module; Read the first debugging information from the internal log file to determine whether the number of times the log tracking module creates the log record object is incorrect; The second debugging information is read from the internal log file to determine whether the content of the adjustment command executed by the log tracking module is incorrect.

7. The method according to claim 1 or 4, characterized in that: The step of printing the internal log file comprises: The internal log file is printed according to the second log record object created by the log tracking module calling the second creation interface.

8. An abnormality detection device for a log tracking module, characterized in that: The device comprises: A determination module, which determines target information of the current application process according to control information sent by the current application process to the log tracking module; A saving module saves the target information to an internal log queue corresponding to the current application process; The output module, when detecting that the target information exists in the internal log queue, triggers the log thread to read the target information from the internal log queue and outputs an internal log file; The detection module prints the internal log file and detects abnormalities of the log tracking module.

9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program that can be run on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A machine-readable storage medium, characterized in that: The machine-readable storage medium stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement the steps of the method described in any one of claims 1 to 7.