CN118034703A - Log processing method, system, equipment and storage medium for zero code intrusion - Google Patents
Log processing method, system, equipment and storage medium for zero code intrusion Download PDFInfo
- Publication number
- CN118034703A CN118034703A CN202410198685.9A CN202410198685A CN118034703A CN 118034703 A CN118034703 A CN 118034703A CN 202410198685 A CN202410198685 A CN 202410198685A CN 118034703 A CN118034703 A CN 118034703A
- Authority
- CN
- China
- Prior art keywords
- log
- parameters
- class
- template
- data buffer
- 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.)
- Pending
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 27
- 238000000034 method Methods 0.000 claims abstract description 77
- 238000012545 processing Methods 0.000 claims abstract description 25
- 238000000605 extraction Methods 0.000 claims abstract description 21
- 238000004458 analytical method Methods 0.000 claims abstract description 14
- 239000003795 chemical substances by application Substances 0.000 claims abstract description 14
- 230000004044 response Effects 0.000 claims abstract description 12
- 230000014509 gene expression Effects 0.000 claims abstract description 6
- 230000009545 invasion Effects 0.000 abstract description 3
- 238000010586 diagram Methods 0.000 description 13
- 238000004590 computer program Methods 0.000 description 12
- 230000008569 process Effects 0.000 description 6
- 238000011156 evaluation Methods 0.000 description 5
- 230000006870 function Effects 0.000 description 5
- 238000004891 communication Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 230000001965 increasing effect Effects 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 230000009471 action Effects 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 238000013459 approach Methods 0.000 description 1
- 230000006399 behavior Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000002708 enhancing effect Effects 0.000 description 1
- 239000000835 fiber Substances 0.000 description 1
- 239000012634 fragment Substances 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Landscapes
- Debugging And Monitoring (AREA)
Abstract
The invention discloses a log processing method, a system, equipment and a storage medium for zero code intrusion, which comprises the following steps: byte code enhancement: when a program is started to load a class, performing annotation scanning, scanning out a method comprising @ LogParam annotation, performing byte code enhancement by using ASM at the end of a scope of variable parameters modified by LogParam, and caching the byte code enhancement parameters into a data buffer; agent class generation: when a program is started, generating proxy class for a method carrying @ Log annotation at the same time; agent class parameter extraction: the method comprises the steps of extracting request parameters, extracting response parameters and extracting variable parameters in the method from a data buffer; template analysis: performing template analysis processing to generate a log character string; the template supports freemark two schemes of a template engine and a Spel expression; and (3) log storage: the log is stored by invoking a concrete implementation of LogHandler of custom store logic. The log processing method of the invention can have flexibility while zero invasion to codes.
Description
Technical Field
The present invention relates to the field of software development, and in particular, to a log processing method, system, device and storage medium for zero code intrusion.
Background
There is an increasing demand for operation logs that are necessary for software developers. While many people implement simple logging using Spring's AOP technology, current solutions do not fully meet the requirements for complex logging requirements, such as logging specific variables in the code, requesting to join or responding to results, etc.
At present, the scheme of the existing self-developed component or the existing component developed by others comprises two kinds of components: scheme one: the simplest approach is to add a journaling code within each scheme. Scheme II: most Spring-based Aop technologies; generating a proxy class by CGLIB; the original codes are enhanced through the proxy class, so that the code log record of the method level can be realized.
Scheme one: the simplest, most flexible and most primitive, but for slightly larger or more complex systems, such code is fatal to the program, adding a heap of code for journaling to the business process code. The complexity of the service is increased and the readability of the code is also greatly affected.
Scheme II: many people adopt the scheme II because it solves the problem of the scheme I, adopts CGLIB to generate the scheme of the proxy class through the Aop mechanism of Spring, solves the intrusion of the service codes, but the scheme loses the flexibility of the scheme I.
In order to overcome the defects of the scheme, the device integrates the advantages and the disadvantages of the scheme I and the scheme II, and provides the device with flexibility while zero invasion to codes is realized.
Disclosure of Invention
In view of this, the embodiment of the invention provides a log processing method of zero code intrusion, which enables the log processing method to have flexibility while performing zero intrusion on codes so as to solve the problems existing in the prior art.
In a first aspect, an embodiment of the present invention provides a log processing method of zero code intrusion, including:
Byte code enhancement: when a program is started to load a class, performing annotation scanning, scanning out a method comprising @ LogParam annotation, performing byte code enhancement by using ASM at the end of a scope of variable parameters modified by LogParam, and caching the byte code enhancement parameters into a data buffer;
agent class generation: when a program is started, generating proxy class for a method carrying @ Log annotation at the same time;
agent class parameter extraction: the method comprises the steps of extracting request parameters, extracting response parameters and extracting variable parameters in the method from a data buffer;
Template analysis: performing template analysis processing to generate a log character string;
And (5) storing a log.
According to a specific implementation manner of the embodiment of the invention, in the template analysis, a template defined by corresponding @ Log annotation supports freemark template engines and Spel expressions.
According to a specific implementation manner of the embodiment of the present invention, in the log storage, the log is stored by calling a specific implementation of LogHandler of the custom storage logic.
According to a specific implementation manner of the embodiment of the invention, the data buffer area is stored by adopting Threadlocal; after extracting the variable parameters in the method, the proxy class destroys the ThreadLocal data in the data buffer.
In a second aspect, an embodiment of the present invention provides a log processing system for zero code intrusion, including:
a byte code enhancement module: the method comprises the steps of carrying out annotation scanning when a program is started to load a class, scanning out a method comprising @ LogParam annotation, carrying out byte code enhancement by using ASM at the end of a scope of variable parameters modified by LogParam, and caching the byte code enhancement parameters into a data buffer;
the agent class generation module: configured to generate proxy classes for methods carrying @ Log annotations at the same time when the program is started;
the agent class parameter extraction module: configured to perform request parameter extraction, response parameter extraction, and variable parameters in the method from the data buffer cache;
and a template analysis module: configured to perform template parsing processing to generate a log string;
and the log storage module is used for: is configured to store the log.
According to a specific implementation manner of the embodiment of the invention, in the template analysis module, a template defined by the corresponding @ Log annotation supports freemark template engines and Spel expressions.
According to a specific implementation manner of the embodiment of the present invention, in the log storage module, the log is stored by calling a specific implementation of LogHandler of the custom storage logic.
According to a specific implementation manner of the embodiment of the invention, the data buffer area is stored by adopting Threadlocal; after extracting the variable parameters in the method, the proxy class destroys the ThreadLocal data in the data buffer.
In a third aspect, an embodiment of the present invention further provides an electronic device, including:
At least one processor; and
A memory communicatively coupled to the at least one processor; wherein,
The memory stores instructions executable by the at least one processor, which when executed by the at least one processor, cause the at least one processor to perform the log processing method of zero code intrusion of the first aspect or any implementation of the first aspect.
In a fourth aspect, embodiments of the present invention also provide a non-transitory computer-readable storage medium storing computer instructions which, when executed by at least one processor, cause the at least one processor to perform the log processing method of zero code intrusion in any implementation of the foregoing first aspect or the first aspect.
In a fifth aspect, embodiments of the present invention also provide a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, cause the computer to perform the log processing method of zero code intrusion in any one of the implementations of the first aspect or the first aspect.
The invention realizes zero-invasion type processing of request parameters (method parameter entry), response parameters (method parameter exit) and variable parameters in the method by means of mutual coordination of byte code enhancement by proxy class and ASM; the method solves the serious problem of code intrusion of the first scheme and the problem of insufficient flexibility of the second scheme. The method provides a more flexible and convenient log recording and storage mode for a software developer, and effectively solves the limitation of the existing scheme.
The invention enables a developer to more easily record and store the log, and provides a high-efficiency and feasible solution. By the method, flexibility and customizability of log records are effectively improved, and high operability is reserved for the software development industry while safety requirements are met.
Drawings
The foregoing is merely an overview of the present invention, and the present invention is further described in detail below with reference to the accompanying drawings and detailed description.
FIG. 1 is a schematic diagram of a log processing method for zero code intrusion according to an embodiment of the present invention;
FIG. 2 is a flowchart of a log processing method for zero code intrusion according to an embodiment of the present invention;
FIG. 3 is a block diagram of an overall process of log processing method for zero code intrusion according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of extracting internal parameters of a method according to an embodiment of the present invention;
fig. 5 is a schematic diagram of proxy class processing according to an embodiment of the present invention.
FIG. 6 is a schematic diagram of a log processing system with zero code intrusion according to an embodiment of the present invention; and
Fig. 7 is a schematic diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
Embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
Other advantages and effects of the present invention will become apparent to those skilled in the art from the following disclosure, which describes the embodiments of the present invention with reference to specific examples. It will be apparent that the described embodiments are only some, but not all, embodiments of the invention. The invention may be practiced or carried out in other embodiments that depart from the specific details, and the details of the present description may be modified or varied from the spirit and scope of the present invention. It should be noted that the following embodiments and features in the embodiments may be combined with each other without conflict. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
It is noted that various aspects of the embodiments are described below within the scope of the following claims. It should be apparent that the aspects described herein may be embodied in a wide variety of forms and that any specific structure and/or function described herein is merely illustrative. Based on the present disclosure, one skilled in the art will appreciate that one aspect described herein may be implemented independently of any other aspect, and that two or more of these aspects may be combined in various ways. For example, an apparatus may be implemented and/or a method practiced using any number of the aspects set forth herein. In addition, such apparatus may be implemented and/or such methods practiced using other structure and/or functionality in addition to one or more of the aspects set forth herein.
In addition, in the following description, specific details are provided in order to provide a thorough understanding of the examples. However, it will be understood by those skilled in the art that the aspects may be practiced without these specific details.
For convenience of understanding, the terms used in the present invention are explained as follows:
Byte code: java byte code is an intermediate form compiled from Java source code, contains a series of instructions, can be interpreted and executed by a Java Virtual Machine (JVM), and realizes the cross-platform characteristic. This allows Java programs to run on different operating systems and hardware, greatly improving their portability.
ASM: ASM (collectively: java bytecode operation framework) is a tool library for generating and converting Java bytecodes. It provides a way to directly generate byte codes without using a Java compiler, and can edit, modify and generate class files. In general, ASM provides a direct byte code manipulation capability that allows developers to customize and expand the behavior of classes without changing the source code, thereby enabling some advanced programming skills and performance optimization. Meanwhile, ASM is also widely used in many Java frameworks and tools, providing them with powerful underlying support.
Agent class: proxy Class (Proxy Class) is a Class that is used to represent another Class (target Class). In proxy mode, the proxy class acts as an intermediary between the target class and the client, which can control access to the target class, and can perform some additional logic before and after the method of invoking the target class.
Aiming at complex business scenes when logs need to be recorded in a business program in Java development. The embodiment of the invention provides a log processing method which has flexibility and zero code invasion. With the method shown in fig. 1, the service codes are enhanced in a proxy type mode, and when the method internal variable parameters are extracted, the ASM byte code enhancement technology is adopted, so that the method internal variable parameters can be flexibly extracted. The invention also supports flexible log template schemes and the like.
FIG. 2 is a flowchart of a log processing method for zero code intrusion according to an embodiment of the present invention;
Fig. 3 is an overall flow chart of a log processing method of zero code intrusion provided in an embodiment of the present invention.
With reference to fig. 2 and 3, the method for processing log of zero code intrusion according to this embodiment includes:
Step S110, enhancing the byte code: when the program is started to load the class, annotation scanning is carried out, a method comprising @ LogParam annotation is scanned, the ASM is used for byte code enhancement at the end of the scope of the LogParam modified parameter, and the code fragments are dynamically added. The parameters of the byte code enhancement are cached in the data buffer.
Because the method is in the scope, after the scope is generated, the parameters are destroyed and recovered and cannot be obtained, because the parameters are extracted more complex. The embodiment uses ASM to enhance byte code in compiling, embeds own code in the original code logic, and specifically matches with the embodiment shown in fig. 4, comprising the following steps:
and step 1, performing annotation scanning when the program starting class is loaded, and scanning out a method containing @ LogParam annotation.
And 2, positioning a variable code scope modified by the annotation.
And 3, positioning the end of the action domain.
And 4, performing byte code enhancement at the end of the scope.
And step 5, because the enhanced code is called in the running process, the code temporarily stores the variable in a data buffer (LogThreadCache), and the data buffer (LogThreadCache) adopts Threadlocal storage, so that the thread safety is ensured.
Step S120, agent class generation: when the program is started, proxy classes are generated for the method carrying the @ Log annotation.
Step S130, extracting agent class parameters: including request parameter extraction, response parameter extraction, and extracting variable parameters in the method from the data buffer cache.
Request parameters: because the proxy class proxy method is adopted, the corresponding proxy class is called before the method is called. Thus, all request parameters can be extracted and stored using the Req array.
Response parameters: and after the service method is called by the invoke method in the proxy class, the returned value of invoke is the response parameter, and the parameter is cached.
Variable parameters in the method: variable parameters in the method are not available in proxy classes because the scope exists only in code blocks, but because the code is bytecode enhanced in the previous step. The runtime will therefore buffer the parameters into the data buffer (LogThreadCache). The proxy method therefore caches variable parameters in the extraction method via the data buffer (LogThreadCache). After the variable parameters in the method are extracted, the proxy class destroys the ThreadLocal data in the data buffer (LogThreadCache) so as to avoid data leakage.
Step S140, template analysis: and performing template analysis processing to generate a log character string.
The templates defined for the @ Log annotation support two schemes,
The first support freemark stencil engine can add complex Log logic to @ Log.
The second support Spel expression may enable log format definition by simple but parametric references.
Step S150, log storage: an interface LogHandler is defined in the log storage, a log string is generated after the template is parsed, and a storage logic can be defined by implementing LogHandler definition, for example, whether a processing method after log parsing is written into a log or stored in a database, for example, in a Mysql database or an Es database.
Fig. 5 is a schematic diagram of proxy class processing according to an embodiment of the present invention. The processing of the proxy class specifically comprises:
step 1, the procedure call service procedure is changed into call proxy class.
And step2, the proxy class calls the actual service class.
And 3, performing parameter extraction, including request parameter extraction, response parameter extraction and variable parameter extraction in the method.
And 4, performing template analysis processing to generate a log character string.
And 5, storing the log by calling the specific implementation of the custom LogHandler.
The log processing method of the zero code log has the following capabilities:
(1) Log definition capabilities: log definition at the method level is supported.
(2) Log template resolution capability: log support is defined in freemark template mode, also just SpEl template parameter mode. The degree of flexibility in definition of the log is increased.
(3) Log parameter extraction capability: the method supports the access parameters (request parameters and response parameters) of the parameter extraction method, and also has the capability of extracting any variable in the operation process of the method.
(4) Custom log processing logic capability: the method is provided with an implementation interface, and defines whether a processing method after log analysis is written into a log or stored in a database.
Fig. 6 is a schematic diagram of a log processing system with zero code intrusion according to an embodiment of the present invention. With reference to fig. 6, this embodiment provides a log processing system 400 for zero code intrusion, including:
The bytecode enhancement module 410: the method comprises the steps of carrying out annotation scanning when a program is started to load a class, scanning out a method comprising @ LogParam annotation, carrying out byte code enhancement by using ASM at the end of a scope of variable parameters modified by LogParam, and caching the byte code enhancement parameters into a data buffer;
Proxy class generation module 420: configured to generate proxy classes for methods carrying @ Log annotations at the same time when the program is started;
agent class parameter extraction module 430: configured to perform request parameter extraction, response parameter extraction, and variable parameters in the method from the data buffer cache;
Template parsing module 440: configured to perform template parsing processing to generate a log string;
log storage module 450: is configured to store the log.
Referring to fig. 7, an embodiment of the present invention further provides an electronic device 50, including:
At least one processor; and
A memory communicatively coupled to the at least one processor; wherein,
The memory stores instructions executable by the at least one processor to enable the at least one processor to perform a log processing method of zero code intrusion in the foregoing method embodiments.
The embodiment of the invention also provides a non-transitory computer readable storage medium, which stores computer instructions for causing the computer to execute a log processing method of zero code intrusion in the foregoing method embodiment.
Embodiments of the present invention also provide a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, cause the computer to perform a log processing method of zero code intrusion in the foregoing method embodiments.
Referring now to fig. 7, a schematic diagram of an electronic device 50 suitable for use in implementing embodiments of the present invention is shown. The electronic device in the embodiment of the present invention may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a car-mounted terminal (e.g., car navigation terminal), etc., and a stationary terminal such as a digital TV, a desktop computer, etc. The electronic device shown in fig. 7 is only an example and should not be construed as limiting the functionality and scope of use of the embodiments of the invention.
As shown in fig. 7, the electronic device 50 may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 501, which may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 502 or a program loaded from a storage means 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic device 50 are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
In general, the following devices may be connected to the I/O interface 505: input devices 506 including, for example, a touch screen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; an output device 507 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 508 including, for example, magnetic tape, hard disk, etc.; and communication means 509. The communication means 509 may allow the electronic device 50 to communicate with other devices wirelessly or by wire to exchange data. While an electronic device 50 having various means is shown, it should be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead.
In particular, according to embodiments of the present invention, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 509, or from the storage means 508, or from the ROM 502. The above-described functions defined in the method of the embodiment of the present invention are performed when the computer program is executed by the processing means 501.
The computer readable medium of the present invention may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: acquiring at least two internet protocol addresses; sending a node evaluation request comprising the at least two internet protocol addresses to node evaluation equipment, wherein the node evaluation equipment selects an internet protocol address from the at least two internet protocol addresses and returns the internet protocol address; receiving an Internet protocol address returned by the node evaluation equipment; wherein the acquired internet protocol address indicates an edge node in the content distribution network.
Or the computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: receiving a node evaluation request comprising at least two internet protocol addresses; selecting an internet protocol address from the at least two internet protocol addresses; returning the selected internet protocol address; wherein the received internet protocol address indicates an edge node in the content distribution network.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The foregoing is merely illustrative of the present invention, and the present invention is not limited thereto, and any changes or substitutions easily contemplated by those skilled in the art within the scope of the present invention should be included in the present invention. Therefore, the protection scope of the invention is subject to the protection scope of the claims.
Claims (10)
1. A log processing method of zero code intrusion, comprising:
Byte code enhancement: when a program is started to load a class, performing annotation scanning, scanning out a method comprising @ LogParam annotation, performing byte code enhancement by using ASM at the end of a scope of variable parameters modified by LogParam, and caching the byte code enhancement parameters into a data buffer;
agent class generation: when a program is started, generating proxy class for a method carrying @ Log annotation at the same time;
agent class parameter extraction: the method comprises the steps of extracting request parameters, extracting response parameters and extracting variable parameters in the method from a data buffer;
Template analysis: performing template analysis processing to generate a log character string;
And (5) storing a log.
2. The method of claim 1, wherein templates defined by @ Log annotations support both a freemark template engine and Spel expression scheme in the template resolution.
3. The method of claim 1, wherein the log is stored in the log store by invoking a concrete implementation of LogHandler of custom store logic.
4. The log processing method of zero code intrusion according to claim 1, wherein a ThreadLocal storage is adopted in the data buffer; after extracting the variable parameters in the method, the proxy class destroys the ThreadLocal data in the data buffer.
5. A log processing system for zero code intrusion, comprising:
a byte code enhancement module: the method comprises the steps of carrying out annotation scanning when a program is started to load a class, scanning out a method comprising @ LogParam annotation, carrying out byte code enhancement by using ASM at the end of a scope of variable parameters modified by LogParam, and caching the byte code enhancement parameters into a data buffer;
the agent class generation module: configured to generate proxy classes for methods carrying @ Log annotations at the same time when the program is started;
the agent class parameter extraction module: configured to perform request parameter extraction, response parameter extraction, and variable parameters in the method from the data buffer cache;
and a template analysis module: configured to perform template parsing processing to generate a log string;
And the log storage module is configured to store the log.
6. The Log processing device of claim 5, wherein the template parsing module supports freemark template engine and Spel expression schemes corresponding to @ Log annotation definition.
7. The log handling device of zero code intrusion according to claim 5, wherein the log storage module stores the log by invoking a concrete implementation of LogHandler of custom storage logic.
8. The log processing device of claim 5, wherein the data buffer is stored by ThreadLocal; after extracting the variable parameters in the method, the proxy class destroys the ThreadLocal data in the data buffer.
9. An electronic device, comprising:
At least one processor; and
A memory communicatively coupled to the at least one processor; wherein,
The memory stores instructions executable by the at least one processor, which when executed by the at least one processor, cause the at least one processor to perform the log processing method of zero code intrusion according to any one of claims 1 to 5.
10. A non-transitory computer-readable storage medium storing computer instructions that, when executed by at least one processor, cause the at least one processor to perform the log processing method of zero-code intrusion of any one of claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410198685.9A CN118034703A (en) | 2024-02-22 | 2024-02-22 | Log processing method, system, equipment and storage medium for zero code intrusion |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410198685.9A CN118034703A (en) | 2024-02-22 | 2024-02-22 | Log processing method, system, equipment and storage medium for zero code intrusion |
Publications (1)
Publication Number | Publication Date |
---|---|
CN118034703A true CN118034703A (en) | 2024-05-14 |
Family
ID=90998008
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202410198685.9A Pending CN118034703A (en) | 2024-02-22 | 2024-02-22 | Log processing method, system, equipment and storage medium for zero code intrusion |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN118034703A (en) |
-
2024
- 2024-02-22 CN CN202410198685.9A patent/CN118034703A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111740948B (en) | Data packet issuing method, dynamic updating method, device, equipment and medium | |
CN113094123A (en) | Method and device for realizing functions in application program, electronic equipment and storage medium | |
CN110609687A (en) | Compiling method, device, electronic equipment and storage medium | |
CN112817657B (en) | Application program starting item loading method, device, system and storage medium | |
CN111581555A (en) | Document loading method, device, equipment and storage medium | |
CN111400068B (en) | Interface control method and device, readable medium and electronic equipment | |
CN112882694A (en) | Program compiling method and device, electronic equipment and readable storage medium | |
CN112667246A (en) | Application function extension method and device and electronic equipment | |
WO2022184077A1 (en) | Document editing method and apparatus, and terminal and non-transitory storage medium | |
CN110221840B (en) | Function implementation method and device of application program, equipment and storage medium | |
CN109739582B (en) | Function calling method and device, electronic equipment and computer readable storage medium | |
CN113407165B (en) | SDK generation and self-upgrade method, device, readable medium and equipment | |
CN109697034B (en) | Data writing method and device, electronic equipment and storage medium | |
CN112416303B (en) | Software development kit hot repair method and device and electronic equipment | |
CN113608997B (en) | Remote debugging method and device for embedded webpage of application program and electronic equipment | |
CN111562929A (en) | Method, device and equipment for generating patch file and storage medium | |
US8769498B2 (en) | Warning of register and storage area assignment errors | |
CN113391811B (en) | Function compiling method, function compiling device, electronic equipment and computer readable storage medium | |
CN111971655B (en) | Native runtime techniques for hypertext markup language graphics content | |
CN110045952B (en) | Code calling method and device | |
CN111352644A (en) | Applet updating method, device, server and storage medium | |
CN118034703A (en) | Log processing method, system, equipment and storage medium for zero code intrusion | |
CN113448585B (en) | Compiling method and device of thread pool, electronic equipment and storage medium | |
US8836727B2 (en) | System level graphics manipulations on protected content | |
CN111796865A (en) | Byte code file modification method and device, terminal equipment and 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 |