Method and device for acquiring log by Android terminal

A log and terminal technology, which is applied to program control devices, the generation of response errors, and the error detection of redundant data in operations. The effect of development efficiency

Inactive Publication Date: 2012-05-30
TENCENT TECH (SHENZHEN) CO LTD
View PDF3 Cites 35 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] In view of this, the main purpose of the present invention is to provide a method and device for obtaining logs by an Android terminal, which is used to solve the problem that the logs on the terminal must be obtained through the adb tool on the personal computer, the positioning of the software BUG is inaccurate, the real-time performance is poor, and the operation is difficult. cumbersome questions

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
  • Method and device for acquiring log by Android terminal
  • Method and device for acquiring log by Android terminal
  • Method and device for acquiring log by Android terminal

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0028] In order to make the object, technical solution and advantages of the present invention clearer, the present invention will be further described in detail by citing the following embodiments and referring to the accompanying drawings.

[0029] figure 1 A flowchart of a method for obtaining logs on a terminal provided by the present invention, the method includes:

[0030] Step 100, obtain the object instance of the log process (logcat) that Android operating system carries;

[0031] The log acquisition process obtains the object instance of the log process that comes with the Android operating system through the runtime interface (Runtime) provided by the Android operating system, that is, the logcat object instance. The logcat process is a system process that is used to obtain real-time information generated by the operating system and applications log information.

[0032] The method example of obtaining the logcat object instance is as follows:

[0033] Runtime.ge...

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 a method and a device for acquiring a log by an Android terminal, and the method and the device are used for solving the problems that software BUG cannot be positioned accurately, the instantaneity is poor and the operation is complicated because the log can be acquired from the terminal only by an adb tool on a personal computer (PC). The method comprises the following steps of: acquiring an object embodiment of a log progress of an Android operating system through an interface function during running, acquiring logs recorded by the log progress by calling a log acquisition function of the object embodiment of the log progress, and displaying and storing the acquired log records through a master progress. The log records generated by a system and / or an application program can be checked and displayed on a terminal, therefore, the technical problem that debugging of the program is performed by virtue of the PC is solved, and the development efficiency is improved.

Description

technical field [0001] The invention relates to an Android operating system, in particular to a method and device for acquiring logs on a terminal. Background technique [0002] In the software development process based on the Android operating system, if there is a problem with the tested software, the terminal software log is usually captured to locate the problem. If there is no log, some random problems are difficult to find. However, in order to intercept the log, the Android mobile phone driver must be installed on the computer, and the Android SDK is also required. Start the cmd terminal of windows, switch to the tools directory of the SDK, and use the debug bridge (Android Debug Bridge, adb) tool The logcat command is intercepted on the PC terminal. To use this method, the mobile terminal must be connected to the computer, and the Android sdk environment must be installed on the computer. Logs cannot be intercepted without a computer. [0003] Most of the random bu...

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/44G06F11/14
Inventor 徐铮
Owner TENCENT TECH (SHENZHEN) CO LTD
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