Unlock instant, AI-driven research and patent intelligence for your innovation.

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

Active Publication Date: 2019-03-15
高途教育科技集团有限公司
View PDF6 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0006] In view of this, the purpose of the present invention is to provide a dynamic log recording method and device to solve the problem of restarting the server when adding a log recording function to a certain class and method in the related art, thereby affecting the production environment and destroying the problem site. And make the software debugging process longer, reducing the efficiency of software development and debugging

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Dynamic log recording method and device
  • Dynamic log recording method and device
  • Dynamic log recording method and device

Examples

Experimental program
Comparison scheme
Effect test

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]...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention provides a dynamic log recording method and device. The dynamic log recording method comprises the steps that a log recording request is obtained, wherein the log recording request includes identifiers of categories relevant with log records, identifiers of contents of the log records of the categories and identifiers of log recording modes of the categories; when the log recording modes of the categories are recording starting of logs of the categories, agency categories are established for the categories, and the logs of the categories are recorded according to the log records of the categories through the agency categories, wherein the agency categories have log recording functions. By the adoption of the dynamic log recording method and the device. the problem that when a log recording function is newly added to a certain category or method in the relevant arts, a server is needed to be restarted, so that a production environment is affected, a site having problems is destroyed, the software debugging process becomes long and the software development and debugging efficiency is reduced is solved.

Description

technical field [0001] The present invention relates to the field of computer technology, in particular to a dynamic log recording method and device. Background technique [0002] During the development and maintenance of client software, various problems are often encountered. Developers need to rely on the logs recorded by the server to debug software or troubleshoot problems in the production environment. The logs recorded by the server usually include The sent request parameters and the returned result sent by the server to the client. [0003] In related technologies, technologies such as filters or interceptors are usually used to record logs on the server side. Filters or interceptors can be regarded as applications in the server. Class names and method names that need to be logged are pre-defined in filters or interceptors. , after receiving the business request sent by the client, the server records the request parameters and return results of the corresponding cla...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Patents(China)
IPC IPC(8): G06F11/36
CPCG06F11/3636
Inventor 刘晓鹏余文浩
Owner 高途教育科技集团有限公司