Efficient log operating method

An operation method and log technology, applied in the field of WEB development, can solve the problems of increasing the difficulty of upgrading, increasing the complex program and development volume of the system, and achieving the effects of easy management, improved recording activity, and reduced complexity.

Inactive Publication Date: 2015-09-02
G CLOUD TECH
View PDF5 Cites 8 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

This way of displaying and calling significantly increases the amount of complex programs and development of the system, and in the case of changes in the log module, the code that calls the log module needs to be modified, which increases the difficulty of upgrading

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
  • Efficient log operating method

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0020] The following specifically takes the user module of the education cloud system as an example to illustrate the main steps of the device.

[0021] as attached figure 1 Shown is the main flow chart of data query; it includes the following steps:

[0022] Step 1, install and use JDK version 1.5 or above;

[0023] Step 2. Using JDK features, write the annotation interface LogAnnotain, and define the properties of the interface, such as code, des, etc.;

[0024] Step 3, write the basic class BasicAction of Struts2.

[0025] Step 4: Write the business class of Struts2, such as UserAction, and implement its business method. At the same time, mark the log annotation LogAnnotain in the method of writing the business log, and initialize its code and des attributes, such as:

[0026] LogAnnotation(code="UserAction.login()", description="user login")

[0027] public String login(){

[0028]}

[0029] Step 5, write the Struts2 interceptor LogInterceptor, and implement the inter...

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 relates to the technical field of WEB development, in particular to an efficient log operating method. The JDK, with the version number being 1.5 or larger, of JAVA is used in the method, and a universal annotation interface of logs is achieved through an annotation interface of the JDK. When Action codes of the Struts2 are compiled, a log annotation interface is labeled before the logs needing to be inserted. Secondarily, configuration of a Struts2 interceptor is completed, and all user requests are configured to pass the interceptor. The basic class of the Struts2 is compiled, and Action of other services needs to inherit the basic class. When a user requests a struts2 method, the interceptor judges whether annotation interfaces exist or not through a method, and whether the logs need to be written into the services or not is judged. In the code development process, if log information needs to be written into the services, it is only needed that the log annotation interface is used before the service method is used. Due to the method, the log newly-increased functions of a system can be greatly reduced, and development efficiency and upgrading efficiency are improved; the method can be used for log recording operation.

Description

technical field [0001] The invention relates to the technical field of WEB development, in particular to an efficient logging operation method based on struts2 and annotation technology. Background technique [0002] In the research and development process based on the J2EE platform, some key operations need to be related to the operation log function to record the function, code, operator, and operation results of the operation. In the traditional development process, the log playback operation is usually performed by calling the log module after the business code is completed. This way of displaying calls obviously increases the amount of complex programs and development of the system, and in the case of changes in the log module, the code that calls the log module needs to be modified, which increases the difficulty of upgrading. Contents of the invention [0003] The technical problem solved by the present invention is to provide an efficient log operation method, and...

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 Applications(China)
IPC IPC(8): G06F9/44
Inventor 关班记季统凯
Owner G CLOUD TECH
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products