CN112100018B - Log information generation method and related device - Google Patents

Log information generation method and related device Download PDF

Info

Publication number
CN112100018B
CN112100018B CN201910525857.8A CN201910525857A CN112100018B CN 112100018 B CN112100018 B CN 112100018B CN 201910525857 A CN201910525857 A CN 201910525857A CN 112100018 B CN112100018 B CN 112100018B
Authority
CN
China
Prior art keywords
information
log information
log
context
context information
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
CN201910525857.8A
Other languages
Chinese (zh)
Other versions
CN112100018A (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201910525857.8A priority Critical patent/CN112100018B/en
Publication of CN112100018A publication Critical patent/CN112100018A/en
Application granted granted Critical
Publication of CN112100018B publication Critical patent/CN112100018B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/302Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3065Monitoring arrangements determined by the means or processing involved in reporting the monitored data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3089Monitoring arrangements determined by the means or processing involved in sensing the monitored data, e.g. interfaces, connectors, sensors, probes, agents
    • G06F11/3093Configuration details thereof, e.g. installation, enabling, spatial arrangement of the probes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2201/00Indexing scheme relating to error detection, to error correction, and to monitoring
    • G06F2201/865Monitoring of software

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the application discloses a method and a related device for generating log information, which acquire context information corresponding to a preset field in a program code based on the preset field in the log information, so that new log information comprising the context information is automatically generated, and the workload of program writers is reduced. The method for generating the log information provided by the embodiment of the application comprises the following steps: acquiring N preset fields included in the first log information from the program code, wherein the preset fields have a corresponding relation with the context information, and N is an integer greater than or equal to 1; acquiring context information sets corresponding to N preset fields from the program code according to the preset fields, wherein the context information sets comprise at least one piece of context information; generating second log information according to the context information set and the first log information, wherein the second log information comprises the context information set.

Description

Log information generation method and related device
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for generating log information.
Background
Intelligent terminal devices such as smartphones, tablet computers, personal computers, smart televisions and the like have become indispensable tools in life of people. In order to meet various demands that users may encounter in life, various application providers develop various application programs that are installed in their own smart terminal devices by default or selectively by users.
For an application program in the intelligent terminal equipment, in order to acquire the operation behaviors of a user, and also in order to analyze and determine the cause of the error when the application program runs in error, after the application program runs, a corresponding application program log is formed in the intelligent terminal equipment and used for recording various events in the running aspect of the application program.
In general, in order to ensure that an application program is started by a user and then runs to form a corresponding application program log, when a program writer writes a code of the application program, the content of the application program log formed by the application program during running needs to be predefined. In the prior art, the content of the application program log is predefined and is realized by manually writing codes by a program writer, so that the workload of the program writer when writing the codes of the application program log content is huge, and the efficiency of developing the application program by the program writer is reduced.
Disclosure of Invention
The embodiment of the application provides a method and a related device for generating log information, which are used for acquiring context information corresponding to a preset field in a program code based on the preset field in the log information, so that new log information comprising the context information is automatically generated, and a program writer can automatically acquire the log information comprising the context information only by inputting the preset field when writing the code of the log information, thereby reducing the workload of the program writer.
An embodiment of the present application provides a method for generating log information, including:
acquiring N preset fields included in the first log information from the program code, wherein the preset fields have a corresponding relation with the context information, and N is an integer greater than or equal to 1;
acquiring context information sets corresponding to N preset fields from the program code according to the preset fields, wherein the context information sets comprise at least one piece of context information;
generating second log information according to the context information set and the first log information, wherein the second log information comprises the context information set.
A second aspect of an embodiment of the present application provides an apparatus for generating log information, including:
An obtaining unit, configured to obtain N preset fields included in the first log information from the program code, where the preset fields have a correspondence with the context information, and N is an integer greater than or equal to 1;
the acquisition unit is further used for acquiring context information sets corresponding to the N preset fields from the program code according to the preset fields, wherein the context information sets comprise at least one piece of context information;
and the generating unit is used for generating second log information according to the context information set and the first log information, wherein the second log information comprises the context information set.
In one possible design, in an implementation manner of the second aspect of the embodiment of the present application, the method further includes a determining unit;
a determining unit for determining first position information of a preset field in the program code;
and the acquisition unit is also used for acquiring the execution condition information according to the first position information through a static code analysis method, wherein the execution condition information is information triggering the output of the second log information.
In one possible design, in one implementation of the second aspect of the embodiments of the present application,
the determining unit is further used for determining target field information corresponding to the preset field, wherein the target field information is a target variable value in the program code;
And the acquisition unit is also used for acquiring the context information of the target field information through a static code analysis method.
In one possible design, in one implementation of the second aspect of the embodiments of the present application,
the acquisition unit is further used for acquiring first source information corresponding to the target field information through a static code analysis method, wherein the first source information is a source variable value of the target variable value.
In one possible design, in one implementation of the second aspect of the embodiments of the present application,
the acquisition unit is further used for acquiring second source information corresponding to the target field information through a static code analysis method, wherein the second source information is the name of a source variable value, and the source variable value corresponds to the target variable value.
In one possible design, in an implementation manner of the second aspect of the embodiment of the present application, the method further includes an adding unit;
a determining unit, configured to determine second location information of a preset field in the first log information;
a determining unit configured to determine third location information of the context information set according to the second location information, the third location information being used to indicate a location where the context information set is added in the first log information;
And an adding unit for adding the context information set to the first log information according to the third location information.
In one possible design, in an implementation manner of the second aspect of the embodiment of the present application, the method further includes a replacing unit;
a determining unit, configured to determine second location information of a preset field in the first log information;
and the replacing unit is used for replacing the preset field with the context information set according to the second position information.
A third aspect of an embodiment of the present application provides a terminal device, including: memory, transceiver, processor, and bus system;
wherein the memory is used for storing programs;
the processor is used for executing the program in the memory, and comprises the following steps:
acquiring N preset fields included in the first log information from the program code, wherein the preset fields have a corresponding relation with the context information, and N is an integer greater than or equal to 1;
acquiring context information sets corresponding to N preset fields from the program code according to the preset fields, wherein the context information sets comprise at least one piece of context information;
generating second log information according to the context information set and the first log information, wherein the second log information comprises the context information set;
The bus system is used to connect the memory and the processor to communicate the memory and the processor.
A fourth aspect of the embodiments of the present application provides a computer readable storage medium having instructions stored therein which, when run on a computer, cause the computer to perform the method of any of the above aspects.
A fifth aspect of an embodiment of the application provides a computer program product comprising instructions which, when run on a computer or processor, cause the computer or processor to perform the method of any of the above aspects.
From the above technical solutions, the embodiment of the present application has the following advantages:
the embodiment of the application provides a method and a related device for generating log information, which are used for acquiring context information corresponding to a preset field in a program code based on the preset field in the log information, so that new log information comprising the context information is automatically generated, and a program writer can automatically acquire the log information comprising the context information only by inputting the preset field when writing the code of the log information, thereby reducing the workload of the program writer.
Drawings
FIG. 1 is a schematic diagram of a system according to an embodiment of the present application;
fig. 2 is a schematic diagram of a method for generating log information according to an embodiment of the present application;
fig. 3 is an exemplary diagram of acquiring execution condition information according to an embodiment of the present application;
FIG. 4 is a diagram illustrating an example of obtaining context information of target field information according to an embodiment of the present application;
FIG. 5 is a diagram illustrating an example of obtaining context information of target field information according to an embodiment of the present application;
FIG. 6 is an exemplary diagram of log information provided by an embodiment of the present application;
FIG. 7 is an exemplary diagram of log content output based on the log information of FIG. 6;
FIG. 8 is an exemplary diagram of second log information obtained based on the first log information of FIG. 6;
FIG. 9 is an exemplary diagram of second log information obtained based on the first log information of FIG. 6;
FIG. 10 is a schematic diagram of an embodiment of an apparatus for generating log information according to the present application;
FIG. 11 is a schematic diagram of an embodiment of an apparatus for generating log information according to an embodiment of the present application;
FIG. 12 is a schematic diagram of an embodiment of an apparatus for generating log information according to the present application;
FIG. 13 is a schematic diagram of an embodiment of a log information generating apparatus according to an embodiment of the present application;
fig. 14 is a block diagram showing a part of the structure of a personal computer related to a terminal provided by an embodiment of the present application.
Detailed Description
The embodiment of the application provides a method and a related device for generating log information, which are used for acquiring context information corresponding to a preset field in a program code based on the preset field in the log information, so that new log information comprising the context information is automatically generated, and a program writer can automatically acquire the log information comprising the context information only by inputting the preset field when writing the code of the log information, thereby reducing the workload of the program writer.
The terms "first," "second," "third," "fourth" and the like in the description and in the claims and in the above drawings, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the application described herein may be implemented, for example, in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "includes" and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed or inherent to such process, method, article, or apparatus.
It should be understood that the embodiment of the application is applied to a development scene of an application program, specifically, the embodiment of the application can be applied to a scene that a program writer writes an application program, when the program writer writes the log information of the application program, a preset field is written in the log information, then the context information corresponding to the preset field in the program code is acquired based on the preset field in the log information by the method for generating the log information provided by the embodiment of the application, so that new log information comprising the context information is automatically generated, and the program writer can automatically acquire the log information comprising the context information only by inputting the preset field when writing the code of the log information without writing the complete log information, thereby reducing the workload of the program writer and effectively improving the efficiency of developing the program by the program writer.
For most of the application programs on the market, in order to acquire the operation behaviors of the user (for example, counting the times of clicking a certain interface or a certain button in the application program) and also in order to analyze and determine the cause of the error when the application program is in error (for example, the application program is abnormally closed or crashed in the running process, etc.), after the application program is running, a corresponding application program log is formed and is used for recording various events in the running aspect of the application program, so that the background can know the running condition of the application program according to the application program log conveniently. In order to ensure that the application program can form a corresponding application program log in the running process, when a program writer writes the code of the application program, the content of the application program log formed in the running process of the application program needs to be predefined, for example, the variable name, the variable value, the meaning of the variable value, the error code, the error information or the condition of outputting the application program log, which are needed to be included in the application program log, are defined, so that the program writer can quickly position the cause of the error of the application program in the running process according to the application program log.
At present, the content of the application program log is predefined by manually writing codes by a program writer, but in the process of actually writing the application program log content, various different log contents are usually required to be written aiming at various different events of the application program in the running process, and each part of log content may contain a large amount of codes required to be written, so that the workload of the program writer when writing the codes of the application program log content is huge, and the efficiency of the program writer for developing the application program is reduced.
In view of this, an embodiment of the present application provides a method for generating log information, which is applied to a system shown in fig. 1, please refer to fig. 1, fig. 1 is a schematic diagram of a system provided in an embodiment of the present application, and as shown in the drawing, the system may include: the method comprises the steps of a first terminal, a server and a second terminal, wherein program writers write and compile application programs on the first terminal, program writers write preset fields in log information parts of the source programs in the process of writing the source programs (namely programs written by high-level languages), and then after the source programs are written, the source programs are processed through the log information generation method provided by the embodiment of the application, so that the log information parts in the source programs can be filled with corresponding context information according to the preset fields, and finally the source programs which generate new log information are compiled to obtain target programs (namely programs which can be identified and run by a machine); the first terminal is in communication connection with the server, and after the first terminal generates the target program, the first terminal sends the target program to the server so that the second terminal can download the target program from the server; after the second terminal downloads the target program from the server, the target program can be started and operated.
The first terminal and the second terminal may include, but are not limited to, a personal computer, a smart phone, a palm computer, a notebook computer, and other terminal devices.
Next, a method for generating log information provided by the embodiment of the present application will be described from the perspective of the first terminal, and referring to fig. 2, fig. 2 is a schematic diagram of a method for generating log information provided by the embodiment of the present application.
The method for generating the log information provided by the embodiment of the application comprises the following steps:
201. acquiring N preset fields included in the first log information from the program code, wherein the preset fields have a corresponding relation with the context information, and N is an integer greater than or equal to 1;
in this embodiment, in the process of writing the source program by the program writer, only the corresponding preset field may be written when writing the log information of the source program, and then the source program including the preset field in the log information is obtained. For the source program, the preset field included in the log information may be obtained from the program code, specifically, the preset field in the log information may be read by the first terminal in the compiling process, or may be obtained by a text searching method before compiling.
The preset field may be a predefined field, which is used to instruct the first terminal to automatically obtain the CONTEXT information corresponding to the preset field according to the preset field, for example, the preset field may be a field that can be identified by the first terminal, such as "__ CONTEXT __", "/CONTEXT/" or "__ LOG __", and the preset field may also be other representation modes, so long as the preset field can be identified by the first terminal, and the first terminal can obtain the corresponding CONTEXT information according to the preset field, where the representation modes of the preset field are not specifically limited.
It may be appreciated that one or more preset fields may be included in the log information, and for different preset fields, the log information may have a corresponding relationship with different context information, respectively. For example, for the preset field a, the preset field a may be a condition corresponding to the output of the application log (i.e., the condition may be regarded as context information of the whole log information); for preset field B, preset field B may be corresponding to context information of a certain variable value in the program code. In addition, in order to successfully identify different preset fields so as to obtain corresponding CONTEXT information, different representation modes can be adopted to represent the different preset fields, for example, for the preset field a, the representation can be adopted by '__ CONTEXT __'; for the preset field B, the "__ CONTEXT __ (irettcode)" may be used to indicate that "irettcode" indicates a certain variable value; at this time, the preset field a has a correspondence with the context information of the log information including the preset field a (i.e. the condition of outputting the log information), and the preset field has a correspondence with the context information of the variable value "iRetCode" in the program code.
It may be understood that the correspondence between the preset field and the context information corresponding to the preset field may be pre-established, that is, in the process of defining the preset field, the correspondence between the preset field and the context information may be pre-defined, so that after the first terminal obtains the preset field, the first terminal may obtain the context information corresponding to the first terminal according to the preset field. Alternatively, in this embodiment, the correspondence between the preset field and the context information may be defined by a macro. Wherein, a macro is a rule or a mode, or a grammar substitution, for explaining how a specific input (i.e. a preset field in the embodiment of the present application) is converted into a corresponding output (i.e. context information corresponding to the preset field) according to a predefined rule.
202. Acquiring context information sets corresponding to N preset fields from the program code according to the preset fields, wherein the context information sets comprise at least one piece of context information;
in this embodiment, since the preset field and the context information have a correspondence relationship, after the preset field is acquired, the program code may be analyzed, and the context information corresponding to the preset field in the program code is acquired. Wherein, a preset field may correspond to a CONTEXT information, for example, the CONTEXT information corresponding to the preset field a "__ CONTEXT __" is the CONTEXT information including the log information of the preset field a; the CONTEXT information corresponding to the preset field B "__ CONTEXT __ (irettcode)" is the CONTEXT information of the variable value "irettcode" in the program code. Therefore, when only one preset field exists in the log information, the context information corresponding to the preset field is acquired; when the log information has a plurality of preset fields, obtaining the context information corresponding to each preset field to obtain a context information set comprising a plurality of context information.
In this embodiment, the program code may be analyzed by a static code analysis method to obtain the context information corresponding to the preset field therein. The static code analysis (Static program analysis) is a method of performing code analysis by scanning a program code through a technique such as lexical analysis, syntax analysis, control flow, and data flow analysis without running the program code. Program code may be parsed, compiled, and linked primarily by a source code static analysis tool to generate intermediate system data (e.g., including abstract syntax trees, relational call graphs, control flow graphs, etc.), or to extract portions of information in the program code. That is, in the present embodiment, the static code analysis method is a means by which the first terminal understands and analyzes the program code, and only after the program code is understood and analyzed, the context information corresponding to the preset field, such as a condition of outputting the application log, a certain variable value, or a name of a certain variable value, etc., can be acquired in the program code.
It can be understood that, besides the above static code analysis, the program code may be analyzed by other code analysis methods to obtain context information corresponding to the preset field, such as a dynamic code analysis method, which is not described herein.
203. Generating second log information according to the context information set and the first log information, wherein the second log information comprises the context information set.
In this embodiment, after obtaining the context information set, the context information set may be inserted into the original log information (i.e., the first log information), thereby obtaining new log information (i.e., the second log information). That is, the corresponding context information is inserted into the log information portion of the original program code, so that the context information can be included in the log information portion of the newly obtained program code, that is, the program code including the complete log information content is obtained.
It may be understood that, in this embodiment, the process of generating the log information may be specifically performed during the compiling process of the source program, that is, after a preset field included in the log information is read during the compiling process, a context information set corresponding to the preset field is obtained from the program code, and then new log information is generated based on the obtained context information set, where the new log information includes the context information set. For example, when the preset field is represented in the form of a custom macro, in the compiling process, a corresponding context information set can be automatically obtained in a macro unfolding mode, and the log information is filled with the context information set to obtain new log information.
In addition, in this embodiment, the process of generating the log information may be specifically performed before compiling, specifically, after the program code is obtained, the process may be performed by locating a preset field in the log information by means of text searching, then obtaining a context information set corresponding to the preset field from the program code by means of code analysis, and generating new log information based on the obtained context information set, where the new log information includes the context information set. That is, in the compiling process, the source program is processed in advance, and the log information in the source program is updated so that the log information in the processed source program includes the corresponding context information set.
In this embodiment, based on the preset field in the log information, the context information corresponding to the preset field in the program code is obtained, so that new log information including the context information is automatically generated, and the log information including the context information can be automatically obtained only by inputting the preset field when the program writer writes the code of the log information, thereby reducing the workload of the program writer. Meanwhile, compared with the method that a program writer writes the log content manually, the method for generating the log information provided by the embodiment automatically generates the corresponding log information according to the context information in the program code, so that the improvement of the log content is realized, the condition that the program writer is overlooked or in error in the process of writing the code manually is avoided, and the accuracy of the log information is ensured.
Optionally, based on the embodiment corresponding to fig. 2, in an optional embodiment of the method for generating log information provided by the embodiment of the present application, acquiring, according to a preset field, a context information set corresponding to N preset fields from a program code includes:
determining first position information of a preset field in program codes;
and acquiring execution condition information according to the first position information through a static code analysis method, wherein the execution condition information is information triggering the output of the second log information.
It will be appreciated that there are typically a large number of conditional branches in the program code, and that there may be many conditional branches nested in one conditional branch, and that when the program code is executed, different conditions are satisfied, the corresponding conditional branches are entered and execution continues. Thus, in the present embodiment, the execution condition information can be acquired as the context information, thereby obtaining the execution order of the program codes, i.e., obtaining the condition that would trigger the log information output (also referred to as log information printing).
Specifically, referring to fig. 3, fig. 3 is an exemplary diagram of acquiring execution condition information according to an embodiment of the present application. As shown in fig. 3, wherein 301 represents the start of program code; 302 represents a judgment condition a of the program code, which may be a condition having one or more judgment results, for example, a judgment result A1 and a judgment result A2;303 represents log information located after the judgment result A1, and the context information corresponding to the preset field in the log information may be the judgment result A1;304 denotes a judgment condition B located after the judgment result A2, the judgment condition having judgment results B1 and B2;305 represents log information located after the judgment result B1, and the context information corresponding to the preset field in the log information may be the judgment result A1 and the judgment result B1;306 represents log information located after the determination result B2, and the context information corresponding to the preset field in the log information may be the determination result A1 and the determination result B2.
For example, it is assumed that the judgment condition a specifically judges whether a variable value a is equal to A1 or A2, the judgment result A1 is the variable value a equal to A1, and the judgment result A2 is the variable value a equal to A2; the judgment condition B specifically is to judge whether one variable value B is equal to B1 or B2, the judgment result B1 is the variable value B equal to B1, and the judgment result B2 is the variable value B equal to B2. Then, the CONTEXT information (__ CONTEXT __: A1) corresponding to the log information indicated by 303 is the variable value a equal to A1; the CONTEXT information (__ CONTEXT __: A2B 1) corresponding to the log information indicated by 305 is that the variable value a is equal to A2 and the variable value B is equal to B1; the CONTEXT information (__ CONTEXT __: A2B 2) corresponding to the log information indicated at 306 is that the variable value a is equal to A2 and the variable value B is equal to B2.
Optionally, in an optional embodiment of the method for generating log information according to the embodiment of fig. 2, after acquiring N preset fields included in the first log information from the program code, the method further includes:
determining target field information corresponding to a preset field, wherein the target field information is a target variable value in a program code;
according to the preset fields, acquiring the context information sets corresponding to the N preset fields from the program code, wherein the context information sets comprise:
And obtaining the context information of the target field information through a static code analysis method.
It will be appreciated that in some cases, in order to obtain the user's operational behaviour from the output log content, or to analyze and determine the cause of the application error, it is often necessary to determine the state of some variable value, such as the context information of the variable value, at the time of outputting the log content. Therefore, in this embodiment, the context information corresponding to the target variable value in the log information may be obtained through the preset field, so that the finally output log content may include the state of the variable value.
Specifically, in order to be able to acquire the context information of the target variable value based on the preset field, a relationship between the preset field and the target variable value may be established first, so that the first terminal may determine the target variable value corresponding thereto according to the preset field. Taking the preset field as "__ CONTEXT __" as an example, for the "__ CONTEXT __ (irettcode)" field in the log information content, the target field "irettcode" corresponding thereto may be determined according to the preset field "__ CONTEXT __", where "irettcode" is a variable value in the program code.
It should be understood that, in the present embodiment, instead of expressing the relationship between the preset field and the target field information by including the target field information in brackets after the preset field, the relationship between the preset field and the target field information may be expressed in other ways to enable determination of the target field information corresponding thereto from the preset field. Specifically, the relationship between the preset field and the target field information may also be represented by directly adding a target field after the preset field, for example, "__ CONTEXT __ irettcode"; the relationship between the preset field and the target field information may also be represented by adding a specific separation symbol between the preset field and the target field information, for example, "__ CONTEXT __ ·irettcode". The foregoing is some examples of how to represent the relationship between the preset field and the target field information, and is not limited to how to represent the relationship, and in the actual process, the relationship between the preset field and the target field information may also be represented by other manners, which is not described herein in detail.
Optionally, on the basis of the embodiment corresponding to fig. 2, in an optional embodiment of the method for generating log information provided by the embodiment of the present application, obtaining, by a static code analysis method, context information of target field information includes:
And acquiring first source information corresponding to the target field information by a static code analysis method, wherein the first source information is a source variable value of the target variable value.
In this embodiment, since the target variable value may be a value obtained by multiple assignments or a value obtained based on a variable function, in order to obtain a value corresponding to the target variable value, a source variable value of the target variable value may be obtained, and then a value corresponding to the target variable value may be determined according to a specific value of the source variable value.
Specifically, referring to fig. 4, fig. 4 is an exemplary diagram of obtaining context information of target field information according to an embodiment of the present application. As shown in fig. 4, wherein 401 represents the start of program code; 402 represents an initial assignment phase, in which the function getNow () =45, b=max and max=64; denoted at 403 is an assignment phase during execution of the program code, a=getnow (); reference numeral 404 denotes log information located after step 403, in which a source variable value of a needs to be obtained, that is, a=45, 45 is a source variable value; 405 represents an assignment phase during execution of the program code, c=b; 406 denotes an assignment phase in the execution of the program code, a=c; 407 is the log information after step 406, in which the source variable value of a needs to be obtained, i.e. a=c=b=max=64, 64 being the source variable value of a.
In this embodiment, by using the static code analysis method, the execution process of the program code may be analyzed, the source variable value corresponding to the target variable value is automatically obtained, and the value of the target variable value is accordingly determined according to the assignment of the source variable value. Therefore, when the program writer writes the log content, the program writer can directly write the target variable value, so that the source variable value corresponding to the target variable value can be obtained, the program code content is not required to be traversed to automatically determine the value of the target variable value, and the workload of the program writer is further reduced.
Optionally, on the basis of the embodiment corresponding to fig. 2, in an optional embodiment of the method for generating log information provided by the embodiment of the present application, obtaining, by a static code analysis method, context information of target field information includes:
and acquiring second source information corresponding to the target field information by a static code analysis method, wherein the second source information is the name of a source variable value, and the source variable value corresponds to the target variable value.
In this embodiment, since the target variable value may be a value obtained after multiple assignments or a value obtained based on a variable function, in order to facilitate a program writer to quickly determine the source of the target variable value when looking up the output log in the later period, the name of the source variable value corresponding to the target variable value may be obtained, so that the program writer quickly determines the source of the target variable value, without traversing from the original program code to find the source of the target variable value.
Specifically, referring to fig. 5, fig. 5 is an exemplary diagram of obtaining context information of target field information according to an embodiment of the present application. As shown in fig. 5, wherein 501 denotes the start of the program code; 502 represents an initial assignment phase, in which the function getNow () =45, b=max and max=64; 503 denotes an assignment phase in the program code execution, a=getnow (); 504 represents log information located after step 503, where the name of the source variable value of a needs to be obtained, that is, a is derived from the function getNow (), and the name of the source variable value of a is the function getNow (); 505 denotes the assignment phase during execution of the program code, c=b; 506 denotes an assignment phase in the execution of the program code, a=c; 507 represents the log information after step 506, where the source variable value of a needs to be obtained, i.e. a is derived from MAX, where MAX is the source variable value of a.
In this embodiment, by using the static code analysis method, the execution process of the program code may be analyzed, the source variable value corresponding to the target variable value may be automatically obtained, and the name of the source variable value may be determined. Therefore, when the program writer writes the log content, the program writer can directly write the target variable value, the name of the source variable value corresponding to the target variable value can be obtained, the program code content is not required to be traversed again to determine the source of the target variable value, and the workload of the program writer is further reduced.
For ease of understanding, the process of generating log information will be described in detail below in connection with specific program code. Referring to fig. 6 and fig. 7, fig. 6 is an exemplary diagram of log information provided in an embodiment of the present application; fig. 7 is an exemplary diagram of log content output based on the log information of fig. 6.
FIG. 6 shows log information written by a program writer during the process of writing program codes; fig. 7 shows log contents outputted based on the log information of fig. 6 during the program running. The method for generating log information in fig. 6 and fig. 7 further includes complete log information obtained by processing the log information shown in fig. 6 by a log information generating method, which is not described in detail herein.
As shown in fig. 6, 601 represents a condition of outputting log information, specifically, a condition when the length of the value of the input_application_no is greater than 64; 602 indicates that the error code iretdode=application_no_over_ldm_max_len is specified in the case where the above condition is satisfied; reference numeral 603 denotes printing (outputting) log information in the case where the above-described condition is satisfied, wherein the log information to be printed includes __ CONTEXT __, i.e., CONTEXT information corresponding to the current conditional branch; 604 shows that the log information to be printed also includes __ CONTEXT __ (irettcode), i.e., the CONTEXT information of the target variable value irettcode; reference numeral 605 denotes a return error code.
When the length of the value satisfying the condition in_apply_no shown in fig. 6 is greater than 64, the outputted log information is as shown in fig. 7, wherein context information corresponding to 603, namely, in_apply_no. size () >64,condition value =230, denoted by 701, wherein in_apply_no. size () >64 is a condition for outputting the log information, and condition value=230 is a specific value of the condition value corresponding to when the current condition for outputting the log information is satisfied; reference numeral 702 denotes context information corresponding to reference numeral 604, i.e., iretcode= -300from APPLY_NO_OVER_LDM_MAX_LEN, wherein error code iRetCode has a value of-300 and error code iRetCode is derived from application_no_over_ldm_max_len.
Optionally, on the basis of the embodiment corresponding to fig. 2, in an optional embodiment of the method for generating log information provided in the embodiment of the present application, generating the second log information according to the context information set and the first log information includes:
determining second position information of a preset field in the first log information;
determining third position information of the context information set according to the second position information, wherein the third position information is used for indicating the position of the context information set added in the first log information;
The context information set is added to the first log information according to the third location information.
In this embodiment, the manner of generating the second log information from the first log information may be to add the context information set to the first log information based on the position information of the preset field in the first log information, thereby obtaining the second log information. Wherein the second location information refers to a location preset in the first log information, such as paragraph information, etc.; the third location information is a location where the context information set is added to the first log information, for example, a location where the context information set is added to the back or front of the preset field.
Specifically, referring to fig. 8, fig. 8 is an exemplary diagram of second log information obtained based on the first log information of fig. 6. It can be seen that, compared to fig. 6, in fig. 8, __ CONTEXT __ in fig. 6 is followed by corresponding CONTEXT information, i.e., update_application_no. size () >64,condition value =230; __ CONTEXT __ (iRetCode) is also followed by the corresponding CONTEXT information, i.e. iretcode= -300from APPLY_NO_OVER_LDM_MAX_LEN.
Optionally, on the basis of the embodiment corresponding to fig. 2, in an optional embodiment of the method for generating log information provided in the embodiment of the present application, generating the second log information according to the context information set and the first log information includes:
Determining second position information of a preset field in the first log information;
and replacing the preset field with the context information set according to the second position information.
In this embodiment, the manner of generating the second log information according to the first log information may be to replace the preset field in the first log information with the corresponding context set based on the position information of the preset field in the first log information, so as to obtain the second log information. The second location information refers to a location preset in the first log information, for example, paragraph information, etc.
Specifically, referring to fig. 9, fig. 9 is an exemplary diagram of second log information obtained based on the first log information of fig. 6. It can be seen that, compared to fig. 6, in fig. 9, __ CONTEXT __ in fig. 9 is replaced with corresponding CONTEXT information, i.e., update_application_no. size () >64,condition value =230; __ CONTEXT __ (irettcode) is also replaced with the corresponding CONTEXT information, i.e. irettcode= -300from APPLY_NO_OVER_LDM_MAX_LEN.
Referring to fig. 10, fig. 10 is a schematic diagram illustrating an embodiment of a log information generating apparatus according to an embodiment of the present application, where a log information generating apparatus 100 includes:
An obtaining unit 1001, configured to obtain N preset fields included in the first log information from the program code, where the preset fields have a correspondence with the context information, and N is an integer greater than or equal to 1;
the obtaining unit 1001 is further configured to obtain, from the program code, a context information set corresponding to the N preset fields according to the preset fields, where the context information set includes at least one context information;
the generating unit 1002 is configured to generate second log information according to the context information set and the first log information, where the second log information includes the context information set.
Optionally, referring to fig. 11, fig. 11 is a schematic diagram of an embodiment of an apparatus for generating log information according to an embodiment of the present application; in another embodiment of the log information generating apparatus 100 provided in the embodiment of the present application, the apparatus further includes a determining unit 1003;
a determining unit 1003 for determining first location information of a preset field in the program code;
the obtaining unit 1001 is further configured to obtain, according to the first location information, execution condition information by using a static code analysis method, where the execution condition information is information that triggers output of the second log information.
Alternatively, in another embodiment of the apparatus 100 for generating log information according to the embodiment of the present application based on the embodiment corresponding to fig. 10,
a determining unit 1003, configured to determine target field information corresponding to a preset field, where the target field information is a target variable value in the program code;
the obtaining unit 1001 is further configured to obtain context information of the target field information by using a static code analysis method.
Alternatively, in another embodiment of the apparatus 100 for generating log information according to the embodiment of the present application based on the embodiment corresponding to fig. 10,
the obtaining unit 1001 is further configured to obtain, by using a static code analysis method, first source information corresponding to the target field information, where the first source information is a source variable value of the target variable value.
Alternatively, in another embodiment of the apparatus 100 for generating log information according to the embodiment of the present application based on the embodiment corresponding to fig. 10,
the obtaining unit 1001 is further configured to obtain, by using a static code analysis method, second source information corresponding to the target field information, where the second source information is a name of a source variable value, and the source variable value corresponds to the target variable value.
Optionally, referring to fig. 12, fig. 12 is a schematic diagram of an embodiment of an apparatus for generating log information according to an embodiment of the present application; in another embodiment of the log information generating apparatus 100 provided by the embodiment of the present application, the apparatus further includes an adding unit 1004;
a determining unit 1003 further configured to determine second location information of a preset field in the first log information;
a determining unit 1003 further configured to determine third location information of the context information set according to the second location information, the third location information being used to indicate a location where the context information set is added in the first log information;
an adding unit 1004 is configured to add the context information set to the first log information according to the third location information.
Optionally, referring to fig. 13, fig. 13 is a schematic diagram of an embodiment of an apparatus for generating log information according to an embodiment of the present application; in another embodiment of the log information generating apparatus 100 provided in the embodiment of the present application, the apparatus further includes a replacing unit 1005;
a determining unit 1003 further configured to determine second location information of a preset field in the first log information;
a replacing unit 1005, configured to replace the preset field with the context information set according to the second location information.
The embodiment of the present application further provides a terminal, as shown in fig. 14, for convenience of explanation, only the relevant parts of the embodiment of the present application are shown, and specific technical details are not disclosed, please refer to the method part of the embodiment of the present application. The terminal can be any terminal equipment including personal computers, smart phones, palm computers, notebook computers and the like, and taking personal computers as examples:
fig. 14 is a block diagram showing a part of the structure of a personal computer related to a terminal provided by an embodiment of the present application. Referring to fig. 14, the personal computer includes: memory 1410, input unit 1420, display unit 1430, sensor 1440, audio circuit 1450, wireless fidelity (wireless fidelity, wiFi) module 1460, processor 1470, and power source 1480. It will be appreciated by those skilled in the art that the personal computer configuration shown in fig. 14 is not limiting and may include more or fewer components than shown, or may be combined with certain components, or a different arrangement of components.
The following describes the individual constituent elements of the personal computer in detail with reference to fig. 14:
the memory 1410 may be used to store software programs and modules, and the processor 1470 may execute the various functional applications and data processing of the personal computer by executing the software programs and modules stored in the memory 1410. The memory 1410 may mainly include a storage program area that may store an operating system, application programs required for at least one function (such as a sound playing function, an image playing function, etc.), and a storage data area; the storage data area may store data (such as audio data, phonebook, etc.) created according to the use of the personal computer, etc. In addition, memory 1410 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device.
The input unit 1420 may be used to receive input numeric or character information and to generate key signal inputs related to user settings and function control of the personal computer. In particular, the input unit 1420 may include a touch panel 1421 and other input devices 1422. Touch panel 1421, also referred to as a touch screen, may collect touch operations thereon or thereabout by a user (e.g., operations of the user on touch panel 1421 or thereabout using any suitable object or accessory such as a finger, stylus, etc.), and drive the corresponding connection device according to a predetermined program. Alternatively, touch panel 1421 may include two parts, a touch detection device and a touch controller. The touch detection device detects the touch azimuth of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device and converts it into touch point coordinates, which are then sent to the processor 1470, and can receive commands from the processor 1470 and execute them. In addition, the touch panel 1421 may be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 1421, the input unit 1420 may include other input devices 1422. In particular, other input devices 1422 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, mouse, joystick, etc.
The display unit 1430 may be used to display information input by a user or information provided to the user as well as various menus of a personal computer. The display unit 1430 may include a display panel 1431, and alternatively, the display panel 1431 may be configured in the form of a liquid crystal display (liquid crystal display, LCD), an organic light-emitting diode (OLED), or the like. Further, the touch panel 1421 may overlay the display panel 1431, and when the touch panel 1421 detects a touch operation thereon or thereabout, the touch panel is transferred to the processor 1470 to determine a type of touch event, and then the processor 1470 provides a corresponding visual output on the display panel 1431 according to the type of touch event. Although in fig. 14, the touch panel 1421 and the display panel 1431 are two separate components to implement the input and output functions of the personal computer, in some embodiments, the touch panel 1421 may be integrated with the display panel 1431 to implement the input and output functions of the personal computer.
Audio circuitry 1450, speakers 1451, and microphone 1452 may provide an audio interface between the user and the personal computer. The audio circuit 1450 may transmit the received electrical signal converted from the audio data to the speaker 1451, and the electrical signal is converted into an audio signal by the speaker 1451 to be output; on the other hand, the microphone 1452 converts the collected sound signals into electrical signals, which are received by the audio circuit 1450 and converted into audio data, which are processed by the audio data output processor 1470 and output to the memory 1410 for further processing.
WiFi belongs to a short-distance wireless transmission technology, and a personal computer can help a user to send and receive emails, browse webpages, access streaming media and the like through a WiFi module 1460, so that wireless broadband Internet access is provided for the user. Although fig. 14 shows a WiFi module 1460, it is understood that it does not belong to the essential constitution of a personal computer, and can be omitted entirely as required within the scope of not changing the essence of the invention.
Processor 1470 is a control center of the personal computer, connects various parts of the entire personal computer using various interfaces and lines, and performs various functions of the personal computer and processes data by running or executing software programs and/or modules stored in memory 1410, and calling data stored in memory 1410. In the alternative, processor 1470 may include one or more processing units; alternatively, processor 1470 may integrate an application processor that primarily handles operating systems, user interfaces, applications, etc., with a modem processor that primarily handles wireless communications. It is to be appreciated that the modem processor described above may not be integrated into processor 1470.
The personal computer further includes a power source 1480 (e.g., a battery) for powering the various components, optionally in logical communication with the processor 1470 through a power management system, such as to perform charge, discharge, and power management functions through the power management system.
Although not shown, the personal computer may further include a camera, a bluetooth module, etc., which will not be described herein.
In the embodiment of the present application, the processor 1470 included in the terminal device further has the following functions:
acquiring N preset fields included in the first log information from the program code, wherein the preset fields have a corresponding relation with the context information, and N is an integer greater than or equal to 1;
acquiring context information sets corresponding to N preset fields from the program code according to the preset fields, wherein the context information sets comprise at least one piece of context information;
generating second log information according to the context information set and the first log information, wherein the second log information comprises the context information set.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, which are not repeated herein.
In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be embodied essentially or in part or all of the technical solution or in part in the form of a software product stored in a storage medium, including instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a read-only memory (ROM), a random access memory (random access memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims (12)

1. A method for generating log information, comprising:
acquiring N preset fields included in first log information from a program code, wherein the preset fields have a corresponding relation with context information, and N is an integer greater than or equal to 1;
acquiring context information sets corresponding to the N preset fields from the program code according to the preset fields, wherein the context information sets comprise at least one piece of context information;
generating second log information according to the context information set and the first log information, wherein the second log information comprises the context information set;
the obtaining, according to the preset fields, the context information sets corresponding to the N preset fields from the program code includes: determining first position information of the preset field in the program code; acquiring execution condition information as context information through a static code analysis method according to the first position information, wherein the execution condition information is information triggering the second log information to be output;
and/or after acquiring N preset fields included in the first log information from the program code, determining target field information corresponding to the preset fields, wherein the target field information is a target variable value in the program code; the obtaining, according to the preset fields, the context information sets corresponding to the N preset fields from the program code includes: and acquiring the context information of the target field information through a static code analysis method.
2. The method for generating log information according to claim 1, wherein the obtaining the context information of the target field information by a static code analysis method comprises:
and acquiring first source information corresponding to the target field information by a static code analysis method, wherein the first source information is a source variable value of the target variable value.
3. The method for generating log information according to claim 1, wherein the obtaining the context information of the target field information by a static code analysis method comprises:
and acquiring second source information corresponding to the target field information through a static code analysis method, wherein the second source information is the name of a source variable value, and the source variable value corresponds to the target variable value.
4. The method of generating log information according to claim 1, wherein generating second log information from the context information set and the first log information comprises:
determining second position information of the preset field in the first log information;
determining third position information of the context information set according to the second position information, wherein the third position information is used for indicating the position of the context information set added in the first log information;
And adding the context information set to the first log information according to the third position information.
5. The method of generating log information according to claim 1, wherein generating second log information from the context information set and the first log information comprises:
determining second position information of the preset field in the first log information;
and replacing the preset field with the context information set according to the second position information.
6. An apparatus for generating log information, comprising:
an obtaining unit, configured to obtain N preset fields included in the first log information from the program code, where the preset fields have a correspondence with the context information, and N is an integer greater than or equal to 1;
the acquiring unit is further configured to acquire, from the program code, a context information set corresponding to the N preset fields according to the preset fields, where the context information set includes at least one context information;
a generating unit, configured to generate second log information according to the context information set and the first log information, where the second log information includes the context information set;
The apparatus further comprises: a determination unit;
the determining unit is used for determining first position information of the preset field in the program code;
the acquisition unit is further configured to acquire execution condition information as context information through a static code analysis method according to the first location information, where the execution condition information is information triggering the second log information to be output;
and/or the number of the groups of groups,
the determining unit is configured to determine target field information corresponding to the preset field, where the target field information is a target variable value in the program code;
the acquisition unit is further used for acquiring the context information of the target field information through a static code analysis method.
7. The apparatus for generating log information according to claim 6, wherein the acquiring unit is further configured to acquire first source information corresponding to the target field information by a static code analysis method, the first source information being a source variable value of the target variable value.
8. The apparatus for generating log information according to claim 6, wherein the acquiring unit is further configured to acquire second source information corresponding to the target field information by a static code analysis method, the second source information being a name of a source variable value, the source variable value corresponding to the target variable value.
9. The apparatus for generating log information according to claim 6, wherein the apparatus further comprises an adding unit;
the determining unit is further configured to determine second location information of the preset field in the first log information;
the determining unit is further configured to determine third location information of the context information set according to the second location information, where the third location information is used to indicate a location where the context information set is added in the first log information;
the adding unit is configured to add the context information set to the first log information according to the third location information.
10. The apparatus for generating log information according to claim 6, wherein the apparatus further comprises a replacement unit;
the determining unit is further configured to determine second location information of the preset field in the first log information;
the replacing unit is configured to replace the preset field with the context information set according to the second location information.
11. A terminal device, comprising:
memory, transceiver, processor, and bus system;
wherein the memory is used for storing programs;
The processor is used for executing the program in the memory, and comprises the following steps:
acquiring N preset fields included in first log information from a program code, wherein the preset fields have a corresponding relation with context information, and N is an integer greater than or equal to 1;
acquiring context information sets corresponding to the N preset fields from the program code according to the preset fields, wherein the context information sets comprise at least one piece of context information;
generating second log information according to the context information set and the first log information, wherein the second log information comprises the context information set;
the bus system is used for connecting the memory and the processor so as to enable the memory and the processor to communicate;
the obtaining, according to the preset fields, the context information sets corresponding to the N preset fields from the program code includes: determining first position information of the preset field in the program code; acquiring execution condition information as context information through a static code analysis method according to the first position information, wherein the execution condition information is information triggering the second log information to be output;
And/or after acquiring N preset fields included in the first log information from the program code, determining target field information corresponding to the preset fields, wherein the target field information is a target variable value in the program code; the obtaining, according to the preset fields, the context information sets corresponding to the N preset fields from the program code includes: and acquiring the context information of the target field information through a static code analysis method.
12. A computer readable storage medium having instructions stored therein which, when executed on a computer, cause the computer to perform the method of any one of claims 1 to 5.
CN201910525857.8A 2019-06-17 2019-06-17 Log information generation method and related device Active CN112100018B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910525857.8A CN112100018B (en) 2019-06-17 2019-06-17 Log information generation method and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910525857.8A CN112100018B (en) 2019-06-17 2019-06-17 Log information generation method and related device

Publications (2)

Publication Number Publication Date
CN112100018A CN112100018A (en) 2020-12-18
CN112100018B true CN112100018B (en) 2023-10-13

Family

ID=73749190

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910525857.8A Active CN112100018B (en) 2019-06-17 2019-06-17 Log information generation method and related device

Country Status (1)

Country Link
CN (1) CN112100018B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113535529B (en) * 2021-07-22 2024-05-17 中国银联股份有限公司 Service log analysis method, device and computer readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103092742A (en) * 2011-10-31 2013-05-08 国际商业机器公司 Optimization method and system of program logging
CN106547782A (en) * 2015-09-22 2017-03-29 阿里巴巴集团控股有限公司 The acquisition methods and device of log information
CN106648467A (en) * 2016-12-28 2017-05-10 税友软件集团股份有限公司 Log generation method and system
CN107256220A (en) * 2017-04-25 2017-10-17 北京微影时代科技有限公司 Data logging generation method, device and electronic equipment
CN109739824A (en) * 2018-12-28 2019-05-10 斑马网络技术有限公司 Journal obtaining method and equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103092742A (en) * 2011-10-31 2013-05-08 国际商业机器公司 Optimization method and system of program logging
CN106547782A (en) * 2015-09-22 2017-03-29 阿里巴巴集团控股有限公司 The acquisition methods and device of log information
CN106648467A (en) * 2016-12-28 2017-05-10 税友软件集团股份有限公司 Log generation method and system
CN107256220A (en) * 2017-04-25 2017-10-17 北京微影时代科技有限公司 Data logging generation method, device and electronic equipment
CN109739824A (en) * 2018-12-28 2019-05-10 斑马网络技术有限公司 Journal obtaining method and equipment

Also Published As

Publication number Publication date
CN112100018A (en) 2020-12-18

Similar Documents

Publication Publication Date Title
WO2015143865A1 (en) Application scenario identification method, power consumption management method and apparatus and terminal device
CN106844181B (en) Method, system and mobile terminal for recording user behavior
US20090203368A1 (en) Automated recording of virtual device interface
CN106295353B (en) Engine vulnerability detection method and detection device
CN106502703B (en) Function calling method and device
CN111061383B (en) Text detection method and electronic equipment
CN111708557B (en) Method, device and storage medium for updating configuration file
CN112399006B (en) File sending method and device and electronic equipment
CN111512278B (en) Method for processing application of terminal equipment and terminal equipment
CN103197880A (en) Method and apparatus for displaying keypad in terminal having touch screen
CN104750378A (en) Automatic input mode switching method and device for input method
CN104699408A (en) Operation method and device of touch screen and touch device
CN109343926A (en) Application program image target display methods, device, terminal and storage medium
CN104077065A (en) Method for displaying virtual keyboard by touch screen terminal and touch screen terminal
US20170277379A1 (en) Method and terminal for processing desktop icon
CN104267867A (en) Content input method and device
CN102855064B (en) A kind of method of functional control help document of quick display application program
CN107066536B (en) Comment determining method and device
CN112100018B (en) Log information generation method and related device
CN108615158B (en) Risk detection method and device, mobile terminal and storage medium
CN113626017A (en) Heterogeneous program analysis method and device, computer equipment and storage medium
CN116755828A (en) Parameter value configuration method, analysis method, electronic device and storage medium
CN110879709A (en) Detection method and device of useless codes, terminal equipment and storage medium
CN104407763A (en) Content input method and system
CN115116434A (en) Application implementation method and device, storage medium and electronic equipment

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
GR01 Patent grant
GR01 Patent grant