CN111190761B - Log output method and device, storage medium and electronic equipment - Google Patents

Log output method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN111190761B
CN111190761B CN201911378732.3A CN201911378732A CN111190761B CN 111190761 B CN111190761 B CN 111190761B CN 201911378732 A CN201911378732 A CN 201911378732A CN 111190761 B CN111190761 B CN 111190761B
Authority
CN
China
Prior art keywords
log
application program
receiving end
communication connection
preset
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.)
Active
Application number
CN201911378732.3A
Other languages
Chinese (zh)
Other versions
CN111190761A (en
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.)
Cloudminds Robotics Co Ltd
Original Assignee
Cloudminds Shanghai Robotics 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 Cloudminds Shanghai Robotics Co Ltd filed Critical Cloudminds Shanghai Robotics Co Ltd
Priority to CN201911378732.3A priority Critical patent/CN111190761B/en
Publication of CN111190761A publication Critical patent/CN111190761A/en
Application granted granted Critical
Publication of CN111190761B publication Critical patent/CN111190761B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0766Error or fault reporting or storing
    • G06F11/0778Dumping, i.e. gathering error/state information after a fault for later diagnosis
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The disclosure relates to a log output method, a log output device, a storage medium and electronic equipment, so as to realize log output of an application program after the application program is released. The method comprises the following steps: determining that the published application program runs abnormally; establishing communication connection between the application program and a log receiving end; and setting a preset log output zone bit in the application program to be in an on state in response to successful communication connection between the application program and the log receiving end so as to trigger the log information of the application program to be output to the log receiving end.

Description

Log output method and device, storage medium and electronic equipment
Technical Field
The disclosure relates to the technical field of computers, and in particular relates to a log output method, a log output device, a storage medium and electronic equipment.
Background
The log is an indispensable part of the application program, and can record the running state of the application program and some running anomalies, thereby being convenient for updating and modifying the application program. In the development stage of an application program, log information is generally recorded, so that errors and abnormal situations are tracked according to the log information. However, after the application program is released, since the released application program is subjected to the unit test, the integration test, and the system test, the processing of the operation abnormality is relatively perfect, and the output of the log is generally masked based on the consideration of the operation performance.
In this case, if the running of the application program is abnormal, since there is no log information, it cannot be determined what the current state of the application program is, so that the abnormality cannot be located, and the running abnormality of the application program cannot be solved well.
Disclosure of Invention
The disclosure aims to provide a log output method, a log output device, a storage medium and electronic equipment, so as to realize log output of an application program after the application program is released.
To achieve the above object, in a first aspect, the present disclosure provides a log output method, the method including:
determining that the published application program runs abnormally;
establishing communication connection between the application program and a log receiving end;
and setting a preset log output zone bit in the application program to be in an on state in response to successful communication connection between the application program and the log receiving end so as to trigger the log information of the application program to be output to the log receiving end.
Optionally, the setting the preset log output flag bit in the application program to the on state in response to the successful communication connection between the application program and the log receiving end includes:
monitoring whether the communication connection between the application program and the log receiving end is successful or not through independent threads which do not execute other functions;
and if the application program and the log receiving end are monitored to be successfully connected in communication, setting a preset log output zone bit in the application program to be in an open state.
Optionally, the log information corresponds to a preset processing priority, and the outputting the log information of the application program to the log receiving end includes:
and sending the log information of the application program and the preset processing priority corresponding to the log information to the log receiving end, so that the log receiving end displays the received log information according to the preset processing priority.
Optionally, the log information corresponds to a preset processing priority, and the method further includes:
receiving a target processing priority sent by the log receiving end;
the outputting the log information of the application program to the log receiving end includes:
and sending the log information with the preset processing priority higher than or equal to the target processing priority to the log receiving end in the log information of the application program.
Optionally, the establishing the communication connection between the application program and the log receiving end includes:
acquiring communication connection information of the log receiving end from a preset configuration file, wherein the communication connection information comprises an IP address and a port number of the log receiving end;
and establishing communication connection with the log receiving end according to the communication connection information.
In a second aspect, the present disclosure also provides a log output device, the device including:
the abnormality determining module is used for determining that the published application program runs abnormally;
the communication connection module is used for establishing communication connection between the application program and the log receiving end;
and the log output module is used for responding to successful communication connection between the application program and the log receiving end, and setting a preset log output zone bit in the application program to be in an on state so as to trigger the log information of the application program to be output to the log receiving end.
Optionally, the log output module is configured to:
monitoring whether the communication connection between the application program and the log receiving end is successful or not through independent threads which do not execute other functions;
and when the application program is monitored to be successfully connected with the log receiving end in a communication way, setting a preset log output zone bit in the application program to be in an open state.
Optionally, the log information corresponds to a preset processing priority, and the log output module is configured to:
and sending the log information of the application program and the preset processing priority corresponding to the log information to the log receiving end, so that the log receiving end displays the received log information according to the preset processing priority.
In a third aspect, the present disclosure also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the method of any of the first aspects.
In a fourth aspect, the present disclosure also provides an electronic device, including:
a memory having a computer program stored thereon;
a processor for executing the computer program in the memory to implement the steps of the method of any of the first aspects.
Through the technical scheme, after the running abnormality of the published application program occurs, the log information of the application program can be output to the log receiving end, so that the abnormality can be conveniently positioned, and the abnormality in the running process of the application program can be better solved. And because the preset log flag bit is triggered to be set to be in the on state after the application program and the log receiving end are successfully connected, the log information of the application program is output instead of real-time output, the resource waste is reduced, and the running performance of the application program is less influenced.
Additional features and advantages of the present disclosure will be set forth in the detailed description which follows.
Drawings
The accompanying drawings are included to provide a further understanding of the disclosure, and are incorporated in and constitute a part of this specification, illustrate the disclosure and together with the description serve to explain, but do not limit the disclosure. In the drawings:
FIG. 1 is a schematic diagram of an implementation scenario of a log output method according to an exemplary embodiment of the present disclosure;
FIG. 2 is a flow chart illustrating a log output method according to an exemplary embodiment of the present disclosure;
FIG. 3 is a flow chart illustrating a log output method according to another exemplary embodiment of the present disclosure;
FIG. 4 is a block diagram of a log output device according to an exemplary embodiment of the present disclosure;
fig. 5 is a block diagram of an electronic device, according to an exemplary embodiment of the present disclosure.
Detailed Description
Specific embodiments of the present disclosure are described in detail below with reference to the accompanying drawings. It should be understood that the detailed description and specific examples, while indicating and illustrating the disclosure, are not intended to limit the disclosure.
The log is an indispensable part of the application program, and can record the running state of the application program and some running anomalies, thereby being convenient for updating and modifying the application program. In the development stage of an application program, log information is generally recorded, so that errors and abnormal situations are tracked according to the log information. However, after the application program is released, since the released application program is subjected to the unit test, the integration test, and the system test, the processing of the operation abnormality is relatively perfect, and the output of the log is generally masked based on the consideration of the operation performance.
In this case, if the running of the application program is abnormal, since there is no log information, it cannot be determined what the current state of the application program is, so that the abnormality cannot be located, and the running abnormality of the application program cannot be solved well.
In view of this, the embodiments of the present disclosure provide a log output method, apparatus, storage medium, and electronic device, so as to implement log output of an application program after the application program is released, solve the problem that abnormality cannot be located in the related art, and better solve the operation abnormality existing in the operation of the application program.
First, possible implementation scenarios of the embodiments of the present disclosure will be described. Referring to fig. 1, an implementation scenario of an embodiment of the present disclosure may include a plurality of clients (client 1 to client N) running the same application, and a server storing application running resources. By way of example, the client may be a different type of electronic device, such as a cell phone, a computer, a smart robot, etc., to which embodiments of the present disclosure are not limited, and fig. 1 illustrates the client as a smart robot. In a possible manner, if the client is an intelligent robot, the log output method in the embodiment of the disclosure may be integrated in an SDK package for controlling SCA hardware of the intelligent robot, so as to output corresponding log information to a server under the condition that the intelligent robot operates abnormally, so as to facilitate positioning of the abnormality.
Fig. 2 is a flow chart illustrating a log output method according to an exemplary embodiment of the present disclosure. Referring to fig. 2, the log output method may include:
step 201, determining that the published application program runs abnormally.
Step 202, establishing communication connection between the application program and the log receiving end.
In step 203, in response to successful communication connection between the application program and the log receiving end, a preset log output flag bit in the application program is set to be in an on state, so as to trigger the log information of the application program to be output to the log receiving end.
By the method, after the published application program has running abnormality, log information of the application program can be output to a log receiving end, so that the abnormality can be conveniently located, and the abnormality in the running process of the application program can be better solved. And because the preset log flag bit is triggered to be set to be in the on state after the application program and the log receiving end are successfully connected, the log information of the application program is output instead of real-time output, the resource waste is reduced, and the running performance of the application program is less influenced.
In order to enable those skilled in the art to more understand the log output method in the embodiments of the present disclosure, the following details of each of the above steps are illustrated.
In step 201, the published application may include an application that is available to the user or an application that runs in a client to provide some function to the user. For example, in the above-mentioned scenario of the intelligent robot, the published application may be an application that controls the intelligent robot to perform voice recognition, and the user may send a voice command to the intelligent robot through the application. It should be understood that in the embodiments of the present disclosure, applications refer to published applications unless specifically indicated otherwise.
Illustratively, determining that the application is running abnormally may be: and when the running result of the application program is inconsistent with the expected result, determining that the application program runs abnormally. Alternatively, when the application does not output any running result, an application running abnormality may be determined, and the like, and the embodiment of the present disclosure is not limited to the manner of determining the application running abnormality.
In step 202, the log receiving end may be a program module in an entity server, or may be a cloud server, or the like, which is not limited by the embodiment of the present disclosure. For example, after determining that the application program runs abnormally, a log service program may be started at a server side, a log receiving end is established, such as a cloud server is established, so that the application program may establish a communication connection with the log receiving end, such as the application program may make a TCP connection with the log receiving end, and so on.
In a possible manner, the communication connection between the application program and the log receiving end is established, which may be: and acquiring communication connection information of the log receiving end from a preset configuration file, wherein the communication connection information can comprise an IP address and a port number of the log receiving end. And then, establishing communication connection with the log receiving end according to the communication connection information.
That is, in the embodiment of the present disclosure, the communication connection information of the log receiving end may be preset in the configuration file, for example, the IP address and the port number of the log receiving end are preset in the configuration file, and after determining that the application program runs abnormally, the IP address and the port number of the log receiving end may be read in the preset configuration file, so as to establish the communication connection with the log receiving end. It should be appreciated that since the log receiving end may be a program module in the server, the IP address and port number of the log receiving end may be the IP address and port number of the server.
In a possible manner, whether the communication connection between the application program and the log receiving end is successful or not can be monitored through independent threads which do not execute other functions, and if the communication connection between the application program and the log receiving end is monitored to be successful, a preset log output zone bit in the application program is set to be in an on state.
It should be understood that in the embodiment of the present disclosure, by means of an independent thread monitoring whether the application program is successfully connected to the log receiving end in a communication manner, it can be understood whether the log receiving end on the monitoring server side is successfully established. Specifically, the connection message can be sent to the log receiving end continuously, and when the application program receives the message returned by the log receiving end, the log receiving end can be described as successful establishment, so that the application program and the log receiving end can be determined as successful communication connection. If the application program does not receive the message returned by the log receiving end, the log receiving end can be indicated to be unsuccessfully established, so that the communication connection failure between the application program and the log receiving end can be determined.
For example, the application program can execute the normal application function through the first thread, monitor whether the communication connection with the log receiving end is successful through the second thread, and therefore the normal operation of other functions is prevented from being influenced in the monitoring process. In this case, if the second thread monitors that the communication connection between the application program and the log receiving end is successful, the preset log output flag bit in the application program may be set to an on state, so as to trigger the log information of the application program to be output to the log receiving end.
The initial state of the preset log output flag bit may be an off state, and after the communication connection between the application program and the log receiving end is successful, the preset log output flag bit may be set to an on state, so as to trigger the log information of the application program to be output to the log receiving end. For example, if the preset flag bit is LogFlag, the initial state of LogFlag may be "flag", and after the communication connection between the application program and the log receiving end is successful, the LogFlag is set to "True", so that log information of the application program is output to the log receiving end. By the mode, log information is not frequently output under the condition that the application program runs normally, resource waste can be avoided, and the running performance of the application program is less affected.
In a possible manner, the log information may correspond to a preset processing priority, and accordingly, outputting the log information of the application program to the log receiving end may be: and sending the log information of the application program and the preset processing priority corresponding to the log information to a log receiving end, so that the log receiving end displays the received log information according to the preset processing priority.
For example, the preset processing priority may be set according to actual situations, which is not limited by the embodiment of the present disclosure. For example, the preset processing priority may be determined according to the exception type represented by the log information, and specifically, the processing priorities of the exception types of "error", "debug", "rolling" and "info" may be set to be sequentially reduced, that is, the processing priority of the exception type "error" is the highest, and the processing priority of the exception type "info" is the lowest. In this case, when the log receiving end receives the plurality of log information, the log information with the exception type of "error" may be preferentially displayed, so that the operation and maintenance personnel preferentially processes the log information with the exception type of "error", and efficiency of exception positioning is improved.
In a possible manner, if the log information corresponds to a preset processing priority, the application program may further receive the target processing priority sent by the log receiving end, and correspondingly, output the log information of the application program to the log receiving end, which may be: and sending the log information with the preset processing priority higher than or equal to the target processing priority to a log receiving end in the log information of the application program.
For example, after the application program and the log receiving end are successfully connected in communication, the log receiving end may acquire the target processing priority input by the operation and maintenance personnel, and send the target processing priority to the application program. After receiving the target processing priority sent by the log receiving end, the application program can send the log information with the preset processing priority higher than or equal to the target processing priority to the log receiving end in the log information of the application program, so that the log information is filtered, the transmission quantity of the log information is reduced, and unnecessary resource waste is further avoided.
For example, in the above example, the processing priorities of the exception types "error", "debug", "rolling", and "info" are sequentially lowered, and if the target processing priority is the priority corresponding to the exception type "debug", then the log information of the application program may be determined such that the processing priority is higher than or equal to the log information of the target processing priority, that is, the log information of the exception type "error" may be determined. And then the log information with the exception type of error can be sent to the log receiving end, and compared with the mode of sending all log information to the log receiving end, the mode can realize the filtering of the log information and reduce unnecessary resource waste.
The log output method of the present disclosure is explained below by another exemplary embodiment. Referring to fig. 3, the method includes:
step 301, determining that the published application is running abnormally.
Step 302, obtaining the communication connection information of the log receiving end from the preset configuration file. The communication connection information comprises an IP address and a port number of the log receiving end.
Step 303, establishing communication connection with the log receiving end according to the communication connection information.
Step 304, monitor whether the application program is successfully connected with the log receiving end through the independent thread which does not execute other functions.
In step 305, if it is monitored that the communication connection between the application program and the log receiving end is successful, a preset log output flag bit in the application program is set to be in an on state.
Step 306, the log information of the application program and the preset processing priority corresponding to the log information are sent to the log receiving end, so that the log receiving end displays the received log information according to the preset processing priority.
The specific embodiments of the above steps are illustrated in detail above, and will not be repeated here. It should be further understood that for the purposes of simplicity of explanation of the above method embodiments, all of them are depicted as a series of acts in combination, but it should be appreciated by those skilled in the art that the present disclosure is not limited by the order of acts described above. Further, it should also be appreciated by those skilled in the art that the embodiments described above are preferred embodiments and that the steps involved are not necessarily required by the present disclosure.
By the method, after the running abnormality of the published application program occurs, the log information of the application program can be output to the log receiving end, so that the abnormality can be conveniently located, and the abnormality in the running process of the application program can be better solved. And because the preset log flag bit is triggered to be set to be in the on state after the application program and the log receiving end are successfully connected, the log information of the application program is output instead of real-time output, the resource waste is reduced, and the running performance of the application program is less influenced.
Based on the same inventive concept, the embodiments of the present disclosure also provide a log output device that may be part or all of an electronic apparatus through software, hardware, or a combination of both. Referring to fig. 4, the log output apparatus 400 may include:
an anomaly determination module 401, configured to determine that the published application program runs abnormally;
a communication connection module 402, configured to establish a communication connection between the application program and a log receiving end;
and the log output module 403 is configured to set a preset log output flag bit in the application program to an on state in response to successful communication connection between the application program and the log receiving end, so as to trigger outputting log information of the application program to the log receiving end.
Optionally, the log output module 403 is configured to:
monitoring whether the communication connection between the application program and the log receiving end is successful or not through independent threads which do not execute other functions;
and when the application program is monitored to be successfully connected with the log receiving end in a communication way, setting a preset log output zone bit in the application program to be in an open state.
Optionally, the log information corresponds to a preset processing priority, and the log output module 403 is configured to:
and sending the log information of the application program and the preset processing priority corresponding to the log information to the log receiving end, so that the log receiving end displays the received log information according to the preset processing priority.
Optionally, the log information corresponds to a preset processing priority, and the apparatus 400 further includes:
the receiving module is used for receiving the target processing priority sent by the log receiving end;
the log output module 403 is configured to:
and sending the log information with the preset processing priority higher than or equal to the target processing priority to the log receiving end in the log information of the application program.
Optionally, the communication connection module 402 is configured to:
acquiring communication connection information of the log receiving end from a preset configuration file, wherein the communication connection information comprises an IP address and a port number of the log receiving end;
and establishing communication connection with the log receiving end according to the communication connection information.
The specific manner in which the various modules perform the operations in the apparatus of the above embodiments have been described in detail in connection with the embodiments of the method, and will not be described in detail herein.
Through any device, after the running abnormality of the published application program occurs, the log information of the application program can be output to the log receiving end, so that the abnormality can be conveniently positioned, and the abnormality in the running process of the application program can be better solved. And because the preset log flag bit is triggered to be set to be in the on state after the application program and the log receiving end are successfully connected, the log information of the application program is output instead of real-time output, the resource waste is reduced, and the running performance of the application program is less influenced.
Based on the same inventive concept, the embodiments of the present disclosure further provide an electronic device, including:
a memory having a computer program stored thereon;
and a processor for executing the computer program in the memory to implement the steps of any of the log output methods described above.
In a possible manner, the block diagram of the electronic device may be as shown in fig. 5. Referring to fig. 5, the electronic device may include: a processor 501, a memory 502. The electronic device 500 may also include one or more of a multimedia component 503, an input/output (I/O) interface 504, and a communication component 505. The processor 501 is configured to control the overall operation of the electronic device 500 to perform all or part of the steps in the log output method described above. The memory 502 is used to store various types of data to support operations at the electronic device 500, which may include, for example, instructions for any application or method operating on the electronic device 500, as well as application-related data, such as log-receiver communication connection information, preset processing priorities, and the like.
The Memory 502 may be implemented by any type of volatile or non-volatile Memory device or combination thereof, such as static random access Memory (Static Random Access Memory, SRAM for short), electrically erasable programmable Read-Only Memory (Electrically Erasable Programmable Read-Only Memory, EEPROM for short), erasable programmable Read-Only Memory (Erasable Programmable Read-Only Memory, EPROM for short), programmable Read-Only Memory (Programmable Read-Only Memory, PROM for short), read-Only Memory (ROM for short), magnetic Memory, flash Memory, magnetic disk, or optical disk.
The multimedia component 503 may include a screen and an audio component. Wherein the screen may be, for example, a touch screen, the audio component being for outputting and/or inputting audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signals may be further stored in the memory 502 or transmitted through the communication component 505. The audio assembly further comprises at least one speaker for outputting audio signals.
The I/O interface 504 provides an interface between the processor 501 and other interface modules, which may be a keyboard, mouse, buttons, etc. These buttons may be virtual buttons or physical buttons. The communication component 505 is used for wired or wireless communication between the electronic device 500 and other devices. Wireless communication, such as Wi-Fi, bluetooth, near field communication (Near Field Communication, NFC for short), 2G, 3G, 4G, NB-IOT, eMTC, or other 5G, etc., or one or a combination of more of them, is not limited herein. The corresponding communication component 505 may thus comprise: wi-Fi module, bluetooth module, NFC module, etc.
In an exemplary embodiment, the electronic device 500 may be implemented by one or more application specific integrated circuits (Application Specific Integrated Circuit, abbreviated as ASIC), digital signal processors (Digital Signal Processor, abbreviated as DSP), digital signal processing devices (Digital Signal Processing Device, abbreviated as DSPD), programmable logic devices (Programmable Logic Device, abbreviated as PLD), field programmable gate arrays (Field Programmable Gate Array, abbreviated as FPGA), controllers, microcontrollers, microprocessors, or other electronic components for performing the log output method described above.
In another exemplary embodiment, a computer readable storage medium is also provided that includes program instructions that, when executed by a processor, implement the steps of the log output method described above. For example, the computer readable storage medium may be the memory 502 described above including program instructions executable by the processor 501 of the electronic device 500 to perform the log output method described above.
In another exemplary embodiment, a computer program product is also provided, the computer program product comprising a computer program executable by a programmable apparatus, the computer program having code portions for performing the above-described log output method when executed by the programmable apparatus.
The preferred embodiments of the present disclosure have been described in detail above with reference to the accompanying drawings, but the present disclosure is not limited to the specific details of the above embodiments, and various simple modifications may be made to the technical solutions of the present disclosure within the scope of the technical concept of the present disclosure, and all the simple modifications belong to the protection scope of the present disclosure.
In addition, the specific features described in the foregoing embodiments may be combined in any suitable manner, and in order to avoid unnecessary repetition, the present disclosure does not further describe various possible combinations.
Moreover, any combination between the various embodiments of the present disclosure is possible as long as it does not depart from the spirit of the present disclosure, which should also be construed as the disclosure of the present disclosure.

Claims (10)

1. A log output method, the method comprising:
determining that the published application program runs abnormally;
establishing communication connection between the application program and a log receiving end;
in response to successful communication connection between the application program and the log receiving end, setting a preset log output zone bit in the application program to be in an on state so as to trigger log information of the application program to be output to the log receiving end; before the communication connection between the application program and the log receiving end is successful, the preset log output flag bit is in a closed state.
2. The method of claim 1, wherein the setting the preset log output flag bit in the application to the on state in response to the successful communication connection between the application and the log receiving end comprises:
monitoring whether the communication connection between the application program and the log receiving end is successful or not through independent threads which do not execute other functions;
and if the application program and the log receiving end are monitored to be successfully connected in communication, setting a preset log output zone bit in the application program to be in an open state.
3. The method according to claim 1 or 2, wherein the log information corresponds to a preset processing priority, and the outputting the log information of the application program to the log receiving end includes:
and sending the log information of the application program and the preset processing priority corresponding to the log information to the log receiving end, so that the log receiving end displays the received log information according to the preset processing priority.
4. The method according to claim 1 or 2, wherein the log information corresponds to a preset processing priority, the method further comprising:
receiving a target processing priority sent by the log receiving end;
the outputting the log information of the application program to the log receiving end includes:
and sending the log information with the preset processing priority higher than or equal to the target processing priority to the log receiving end in the log information of the application program.
5. The method according to claim 1 or 2, wherein the establishing a communication connection between the application program and a log receiving end comprises:
acquiring communication connection information of the log receiving end from a preset configuration file, wherein the communication connection information comprises an IP address and a port number of the log receiving end;
and establishing communication connection with the log receiving end according to the communication connection information.
6. A log output device, the device comprising:
the abnormality determining module is used for determining that the published application program runs abnormally;
the communication connection module is used for establishing communication connection between the application program and the log receiving end;
the log output module is used for responding to successful communication connection between the application program and the log receiving end, and setting a preset log output zone bit in the application program to be in an on state so as to trigger the log information of the application program to be output to the log receiving end; before the communication connection between the application program and the log receiving end is successful, the preset log output flag bit is in a closed state.
7. The apparatus of claim 6, wherein the log output module is configured to:
monitoring whether the communication connection between the application program and the log receiving end is successful or not through independent threads which do not execute other functions;
and when the application program is monitored to be successfully connected with the log receiving end in a communication way, setting a preset log output zone bit in the application program to be in an open state.
8. The apparatus according to claim 6 or 7, wherein the log information corresponds to a preset processing priority, and the log output module is configured to:
and sending the log information of the application program and the preset processing priority corresponding to the log information to the log receiving end, so that the log receiving end displays the received log information according to the preset processing priority.
9. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the steps of the method according to any one of claims 1-5.
10. An electronic device, comprising:
a memory having a computer program stored thereon;
a processor for executing the computer program in the memory to implement the steps of the method of any one of claims 1-5.
CN201911378732.3A 2019-12-27 2019-12-27 Log output method and device, storage medium and electronic equipment Active CN111190761B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911378732.3A CN111190761B (en) 2019-12-27 2019-12-27 Log output method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911378732.3A CN111190761B (en) 2019-12-27 2019-12-27 Log output method and device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN111190761A CN111190761A (en) 2020-05-22
CN111190761B true CN111190761B (en) 2023-06-30

Family

ID=70707693

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911378732.3A Active CN111190761B (en) 2019-12-27 2019-12-27 Log output method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN111190761B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112925714A (en) * 2021-03-09 2021-06-08 携程旅游网络技术(上海)有限公司 Application program monitoring method and system, electronic device and storage medium
CN114785676A (en) * 2022-03-02 2022-07-22 深圳市优必选科技股份有限公司 Method, device and equipment for extracting log and storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108124252A (en) * 2017-12-29 2018-06-05 深圳市金立通信设备有限公司 A kind of method, terminal and computer readable storage medium for obtaining information

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003173276A (en) * 2001-12-05 2003-06-20 Nippon Telegr & Teleph Corp <Ntt> Log output control method and apparatus
CN104572411B (en) * 2013-10-10 2019-02-15 腾讯科技(深圳)有限公司 A kind of processing method and processing device of daily record data
CN106341278A (en) * 2016-10-28 2017-01-18 广州华多网络科技有限公司 Log reporting method and device and terminal equipment
CN108491320A (en) * 2018-03-05 2018-09-04 平安普惠企业管理有限公司 Exception analysis method, device, computer equipment and the storage medium of application program

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108124252A (en) * 2017-12-29 2018-06-05 深圳市金立通信设备有限公司 A kind of method, terminal and computer readable storage medium for obtaining information

Also Published As

Publication number Publication date
CN111190761A (en) 2020-05-22

Similar Documents

Publication Publication Date Title
EP3386150B1 (en) Terminal failure processing method, device and system
CN108427616B (en) Background program monitoring method and monitoring device
US20120144251A1 (en) Relevant Alert Delivery In A Distributed Processing System With Event Listeners and Alert Listeners
CN111190761B (en) Log output method and device, storage medium and electronic equipment
CN110457154B (en) Abnormal service processing method and device, storage medium and communication terminal
CN111459770A (en) Server operation state warning method and device, server and storage medium
CN113485918B (en) Test method, test device, electronic equipment and storage medium
CN109218407B (en) Code management and control method based on log monitoring technology and terminal equipment
CN108874825B (en) Abnormal data verification method and device
CN108845912A (en) Service interface calls the alarm method of failure and calculates equipment
CN103501237A (en) Device management method, management platform, device and system
CN111866083A (en) Equipment debugging system and method, equipment to be debugged, remote debugging equipment and transfer server
CN113382056A (en) Data reporting method, device, equipment, storage medium and system
JP2009294837A (en) Failure monitoring system and device, monitoring apparatus, and failure monitoring method
CN110896362B (en) Fault detection method and device
US11930292B2 (en) Device state monitoring method and apparatus
CN110881224B (en) Network long connection method, device, equipment and storage medium
CN111061448A (en) Log information display method and device, electronic equipment and storage medium
CN113791792B (en) Method, device and storage medium for acquiring application call information
CN107872363B (en) Data packet loss processing method and system, readable storage medium and electronic device
CN110930110B (en) Distributed flow monitoring method and device, storage medium and electronic equipment
CN111506641A (en) Data management method, data acquisition platform, data management system and storage medium
US11036624B2 (en) Self healing software utilizing regression test fingerprints
CN110908701B (en) Firmware version switching method and device, storage medium and electronic equipment
CN112134951A (en) Data transmission method and device, electronic equipment and storage medium

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 518000 a1302, building 10, Shenzhen Bay science and technology ecological park, No. 10, Gaoxin South ninth Road, high tech Zone community, Yuehai street, Nanshan District, Shenzhen, Guangdong

Applicant after: Shenzhen Da Yun Duan Intelligent Technology Co.,Ltd.

Address before: 518000 Room 201, building A, No. 1, Qian Wan Road, Qianhai Shenzhen Hong Kong cooperation zone, Shenzhen, Guangdong (Shenzhen Qianhai business secretary Co., Ltd.)

Applicant before: CLOUDMINDS (SHENZHEN) ROBOTICS SYSTEMS Co.,Ltd.

TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20220117

Address after: 201111 Building 8, No. 207, Zhongqing Road, Minhang District, Shanghai

Applicant after: Dalu Robot Co.,Ltd.

Address before: 518000 a1302, building 10, Shenzhen Bay science and technology ecological park, No. 10, Gaoxin South ninth Road, high tech Zone community, Yuehai street, Nanshan District, Shenzhen, Guangdong

Applicant before: Shenzhen Da Yun Duan Intelligent Technology Co.,Ltd.

CB02 Change of applicant information
CB02 Change of applicant information

Address after: 201111 Building 8, No. 207, Zhongqing Road, Minhang District, Shanghai

Applicant after: Dayu robot Co.,Ltd.

Address before: 201111 Building 8, No. 207, Zhongqing Road, Minhang District, Shanghai

Applicant before: Dalu Robot Co.,Ltd.

GR01 Patent grant
GR01 Patent grant