Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Automatic log point burying method and system based on AOP and AspectJ for Android terminal

A log and automatic technology, applied in the direction of instruments, electrical digital data processing, program control devices, etc., can solve problems such as code redundancy, poor maintainability of object-oriented programming, messy log codes, etc., and achieve code decoupling and easy reading And analyze the Log log, improve the effect of development volume

Active Publication Date: 2017-07-21
WUHAN DOUYU NETWORK TECH CO LTD
View PDF3 Cites 28 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] The technical problem to be solved by the present invention is to provide an Android terminal for the defects in the prior art that the log code is messy due to the different development habits of different developers, the traditional object-oriented programming has poor maintainability and a large amount of code redundancy Method and system for automatic log burying based on AOP and AspectJ

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
  • Automatic log point burying method and system based on AOP and AspectJ for Android terminal
  • Automatic log point burying method and system based on AOP and AspectJ for Android terminal
  • Automatic log point burying method and system based on AOP and AspectJ for Android terminal

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0036] In order to make the object, technical solution and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present invention, not to limit the present invention.

[0037] Terminology Explanation:

[0038] AOP: Aspect-oriented programming, a technology that realizes unified maintenance of program functions through pre-compilation and runtime dynamic proxy. AOP is a continuation of OOP and is a hot spot in software development. Using AOP can isolate various parts of business logic, thereby reducing the coupling degree between various parts of business logic, improving the reusability of programs, and improving development. s efficiency.

[0039] Aspectj: An aspect-oriented programming language based on the Java platform, which defines various sets of connecti...

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 discloses an automatic log point burying method and system based on AOP and AspectJ for an Android terminal. The method comprises the steps that self-defined annotations for log point burying are written; an AspectJ compiling mode of an aspect-oriented framework is introduced; an AspectJ aspect program code is written, and entry point matching rules are defined for positions where log point burying needs to be performed, wherein the entry point matching rules include multiple connection points expressed with wildcard characters or regular expressions, the connection points are target entrances injected by the self-defined annotations, and an automatic point burying action is performed on logs in the self-defined annotations at the corresponding positions of the connection points; and during running of a program, buried points are automatically interposed into the logs, and the logs are automatically output through the program or log output is viewed by use of the self-defined annotations. Through the method, automatic log point burying is realized, styles of the logs are unified, the development quantity is increased by use of the annotation mode, the code development quantity can be effectively reduced, code decoupling is realized, and development efficiency is improved.

Description

technical field [0001] The invention relates to the technical field of Android-side software programming, in particular to a method and system for automatic logging of Android-side logs based on AOP and AspectJ. Background technique [0002] In the current Android client project development process, it is basically a multi-person cooperative development mode. During the development process, it is necessary to debug and print the Log log to record and observe whether the function module is executed incorrectly. The Log log is an extremely important detection for developers. It is a means of detecting whether the program flow logic is correct. In the process of multi-person cooperative development, each person's development habits and behaviors may be inconsistent, which will lead to code clutter. [0003] AspectJ's motivation is to find problems that cannot be handled well using traditional programming methods. Consider the problem of enforcing a security policy in some appl...

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
CPCG06F8/315
Inventor 杜文彬
Owner WUHAN DOUYU NETWORK TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products