Dynamic log recording method and device
A recording method and recording method technology, applied in the computer field, can solve problems such as reducing the efficiency of software development and debugging, lengthening the software debugging process, destroying the problem site, etc., so as to shorten the software debugging process, improve the software development and debugging efficiency, flexible The effect of recording
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0029] The first embodiment of the present invention provides a dynamic log recording method, figure 2 It is a schematic flow chart of the first dynamic log recording method in the embodiment of the present invention, the method consists of figure 1 The server in the execution, such as figure 2 As shown, the dynamic logging method in the embodiment of the present invention includes the following steps:
[0030]In step S202, a log record request is obtained, and the log record request includes an identifier of a log record-related class, an identifier of the log record content of the class, and an identifier of the log record mode of the class.
[0031] In this step, the server obtains a logging request, which may be sent by the client or directly input to the server by the developer. The logging request includes the identification of the class related to logging, the identification of the logging content of this class, and the identification of the logging method of this c...
Embodiment 2
[0052] In order to illustrate the method in Embodiment 1 more clearly, the second embodiment of the present invention provides a specific implementation process, which is implemented based on the Spring Framework framework. In this embodiment, a logging plug-in is pre-written. The logging plug-in has the functions of receiving logging requests, establishing proxy classes, starting logging, pausing logging, or ending logging. By implanting the logging plug-in into the Spring Framework framework, flexible logging can be performed on the server side.
[0053] The logging plugin has the following functional modules:
[0054] (1) LogRequest log request module, used to receive the log record request, the log record request can be in the aforementioned URL form;
[0055] (2) The LogRequestCache cache module is used to cache the mapping relationship between each class that needs to record logs and the respective proxy classes. The LogRequestCache cache module stores the generated prox...
Embodiment 3
[0075] Corresponding to the method in Embodiment 1, the third embodiment of the present invention provides a dynamic log recording device, which is applied to the server side, Figure 5 It is a schematic diagram of the module composition of the dynamic log recording device in the third embodiment of the present invention, such as Figure 5 As shown, the device includes:
[0076] An acquisition module 51, configured to acquire a log record request, where the log record request includes an identifier of a class related to the log record, an identifier of the log record content of the class, and an identifier of the log record mode of the class;
[0077] Log record module 52, for when the log record mode of described class is to start recording the log of described class, set up proxy class for described class, record described class according to the log record content of described class through described proxy class log, wherein the proxy class has a logging function.
[0078]...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


