CN103944761A - Android log information filter method and system - Google Patents

Android log information filter method and system Download PDF

Info

Publication number
CN103944761A
CN103944761A CN201410157526.0A CN201410157526A CN103944761A CN 103944761 A CN103944761 A CN 103944761A CN 201410157526 A CN201410157526 A CN 201410157526A CN 103944761 A CN103944761 A CN 103944761A
Authority
CN
China
Prior art keywords
log information
daily record
module
information
title
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201410157526.0A
Other languages
Chinese (zh)
Other versions
CN103944761B (en
Inventor
罗克炬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
SHENZHEN X-POWERS TECHNOLOGY Co Ltd
Original Assignee
SHENZHEN X-POWERS TECHNOLOGY Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by SHENZHEN X-POWERS TECHNOLOGY Co Ltd filed Critical SHENZHEN X-POWERS TECHNOLOGY Co Ltd
Priority to CN201410157526.0A priority Critical patent/CN103944761B/en
Publication of CN103944761A publication Critical patent/CN103944761A/en
Application granted granted Critical
Publication of CN103944761B publication Critical patent/CN103944761B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The invention relates to the log technology, and provides an Android log information filter method and system. The method comprises the steps of modifying all layers of original log information of a system so as to enable the system to have user-defined formats, and filtering the log information, wherein the user-defined formats comprise keyword layer names, module names, function method names and state information. The system comprises a log user-defined module and a log filtering module, wherein the log user-defined module is used for modifying all the layers of original log information of the system so that the system can have the user-defined formats, and the log filtering module is used for filtering the log information. According to the method and system, by modifying all the layers of original log information of the system, the system can have the user-defined formats comprising the keyword layer names, the module names, the function method names and the state information, so that the log information is filtered more accurately, workloads of developing and testing workers is reduced, and work efficiency is improved.

Description

Android log information filter method and system
Technical field
The present invention relates to daily record technology, relate in particular to Android log information filter method and system.
Background technology
System journal is for the each hardware of register system, the event of software institute, and abnormal information in running.In system testing process, exploitation and tester can utilize above-mentioned log information to search extremely, for system is carried out misarrangement, to reach the object of continuing to optimize systematic function.But because system journal not only comprises abnormal information, also comprised correct Debugging message, amount of information is huge, therefore usually need to be by instrument to raise the efficiency.
For Android system, conventionally adopt adblogcat order, output or preservation daily record hereof, arrange by parameter, filter out specific log information.
Although adblogcat order possesses the function of filtering log information, but on the one hand, owing to only comprising the daily record rank (comprising error level, debugging level, warning level and detail level) of module title and module in journal format, therefore, in the time that log information is filtered, can only use module title or daily record rank to limit the Output rusults of daily record, filter type is limited, the result filtering out is accurate not, usually needs further manual screening to obtain required result; Meanwhile, in log information, do not provide corresponding code position, have the ambiguous problem in location, accurately find the abnormal position occurring in code by the abnormal information filtering out, require a great deal of time and energy, inefficiency.
On the other hand, adblogcat order acquiescence can only be printed the system journal outside linux kernel daily record, and for linux kernel daily record, needs the dmesg order by providing in linux kernel to print.That is to say the printing for the daily record of system different layers, need separately to process, virtually increased manual search and search the workload of daily record.Simultaneously because filtering function is not supported in dmesg order, therefore in linux kernel daily record, search the mode that the information of needs can only be searched by manual search, inefficiency.
Summary of the invention
The technical problem to be solved in the present invention is: a kind of Android log information filter method and system are provided, can carry out meticulousr filtration to log information, obtain more accurate result.
The technical problem that the present invention further will solve is: the method and system can be by occurring abnormal position in the accurate location code of abnormal information.
The technical problem that the present invention also will further solve is: the method and system can realize the unified management to system different layers log information.
For solving the problems of the technologies described above, the invention provides a kind of filter method of Android log information, comprising:
The each layer original log information of amendment system, makes it possess user-defined format;
Filter log information;
Described user-defined format comprises keyword layer title, module title, functional based method title and state information.
Further, described user-defined format also comprises keyed file title and the corresponding line number of functional based method.
Further, the step of described filtration log information comprises:
Daily record configuration information is set;
Catch log information;
The log information of catching is mated with configuration information;
The result that meets matching condition is carried out to record.
Further, the described step that daily record configuration information is set comprises keyword layer title, module title, functional based method title and state information is arranged.
The step of catching log information further, comprises: capture to the linux kernel daily record through dmesg order printout and through the other system daily record of adblogcat order printout.
Further, the method also comprises:
One form diverter switch for log information is switched between unprocessed form and user-defined format is set.
The present invention provides a kind of filtration system of Android log information simultaneously, comprising:
For the each layer original log information of amendment system, make it possess the daily record custom block of user-defined format;
And for filtering the daily record filtering module of log information.
Further, described daily record filtering module comprises:
For the daily record configuration module of daily record configuration information is set;
For catching the daily record trapping module of log information;
For the daily record matching module that the log information of catching is mated with daily record configuration information;
And logger module for the result that meets matching condition is recorded.
Further, described daily record trapping module is integrated with dmesg and adblogcat order.
Further, this system also comprises the form diverter switch for log information is switched between unprocessed form and user-defined format.
Compared with prior art, the present invention is by the each layer original log information of amendment system, make it possess the user-defined format that comprises keyword layer title, module title, functional based method title and state information, thereby realize the filtration meticulousr to log information, obtain more accurate result, reduced exploitation and tester's workload; By the corresponding line number of functional based method comprising in log information, can accurately find and in code, occur abnormal position, thereby improve exploitation and tester's operating efficiency; Realize the unified management to system different layers log information by integrated dmesg, adblogcat order.
Brief description of the drawings
Fig. 1 is the schematic diagram of log information filtration system of the present invention;
Fig. 2 is daily record matching module workflow schematic diagram of the present invention;
Fig. 3 is the schematic flow sheet of log information filter method of the present invention.
Embodiment
Below in conjunction with specification drawings and specific embodiments, the invention will be further described.
As shown in Figure 1, log information filtration system of the present invention comprises: for the each layer original log information of amendment system, make it possess the daily record custom block 1 of user-defined format and for filtering the daily record filtering module 2 of log information.
First the accurate not problem of limited for existing filter type, filter result, original log information in each layer is modified, each layer of journal format of self-defined system, make log information comprise the keywords such as a layer title, module title, file name, functional based method title, the corresponding line number of functional based method and state information, its middle level title comprises inner nuclear layer, hal layer, jninative layer and the java layer from the bottom to the superiors, and state information comprises correctly, mistake and alarm condition.When log information is filtered, the keyword layer title, module title, functional based method title and the state information that comprise by it, can obtain the information that comprises special key words; For example want to obtain the abnormal information of certain specific function in required certain particular module of system testing, can be called the residing layer of this module by layer name is set, arrange that module name is called this particular module title, arranges that functional based method name is called this specific function title and state information is set is error condition, and log information is filtered; Because journal format is refined to module title and functional based method title, the result that the more existing filter type of result that therefore this kind of mode filtered filters is more accurate.Further, the keyed file title comprising by log information and the corresponding line number of functional based method, can determine and in code, occur abnormal accurate location, and no longer need manually to search, and improved operating efficiency.
In the process of self-defined journal format, be also provided with a form diverter switch for log information is switched between unprocessed form and user-defined format, to ensure can call the log information of unprocessed form in needs.Its specific implementation is the configuration parameter by an appointment is set, for example, in the time this parameter be set be true, output original log, otherwise filter daily record.
Log information after user-defined format, as the input of daily record filtering module 2, carries out unified management by it to log information.As shown in Figure 1, daily record filtering module 2 comprises: for arrange the daily record configuration module 3 of daily record configuration information, for catch the daily record trapping module 4 of log information, for daily record matching module 5 that the log information of catching is mated with configuration information, for logger module 6 that the result that meets matching condition is recorded and for exporting the daily record output module 7 of log information.
Daily record configuration module 3 arranges daily record configuration information, that is keyword layer title, module title, functional based method title and the state information of required particular log information are arranged, for example need to search the abnormal log information of hal layer, arranging that daily record layer name be called hal layer, stl status information is set is error condition.
Daily record trapping module 4 is integrated dmesg order and adblogcat order, capture to the linux kernel daily record through dmesg order printout and through the other system daily record of adblogcat order printout.
Daily record matching module 5 is according to configuration information set in daily record configuration module 3, and the log information that daily record trapping module 4 is caught mates one by one step by step.Its concrete matching process as shown in Figure 2, reads a log information, according to configuration information, this log information is carried out to layer coupling, contrasts by the layer title in layer title and the configuration information of this log information; If layer name-matches, proceeds module coupling, read next log information otherwise return; If layer title do not arranged in daily record configuration module 3,, without carrying out layer coupling, directly carry out module coupling.By that analogy, until mate step by step complete according to the order of layer, module, functional based method and state information to this log information, if each keyword of this daily record all mates with configuration information, by logger module 6, it is carried out to record, and notify user by daily record output module 7.By above matching process, exploitation and tester can filter out and comprise certain layer and module, the even log information of ad hoc approach and state, afterwards according to the keyed file comprising in log information and the corresponding line number of functional based method, can accurately find and in code, occur abnormal position, the operating efficiency having improved.
With reference to figure 3, be the flow chart of log information filter method of the present invention, comprise the following steps:
S101, the each layer original log information of amendment system, makes it possess user-defined format, and wherein user-defined format comprises keyword: layer title, module title, functional based method title and state information, to realize, log information is filtered more accurately; This user-defined format can further include keyed file title and the corresponding line number of functional based method, occurs abnormal accurate location to determine in code.
S102, arranges daily record configuration information;
S103, catches log information;
S104, mates the log information of catching with configuration information;
S105, carries out record to the result that meets matching condition.

Claims (10)

1. a filter method for Android log information, is characterized in that, comprising:
The each layer original log information of amendment system, makes it possess user-defined format;
Filter log information;
Described user-defined format comprises keyword layer title, module title, functional based method title and state information.
2. method according to claim 1, is characterized in that, described user-defined format also comprises keyed file title and the corresponding line number of functional based method.
3. method according to claim 1 and 2, is characterized in that, the step of described filtration log information comprises:
Daily record configuration information is set;
Catch log information;
The log information of catching is mated with configuration information;
The result that meets matching condition is carried out to record.
4. method according to claim 3, is characterized in that, the described step that daily record configuration information is set comprises keyword layer title, module title, functional based method title and state information are arranged.
5. method according to claim 3, is characterized in that, described in catch log information step comprise: the linux kernel daily record through dmesg order printout and the other system daily record that prints out through adblogcat order are captured.
6. method according to claim 1 and 2, is characterized in that, the method also comprises:
One form diverter switch for log information is switched between unprocessed form and user-defined format is set.
7. a filtration system for Android log information, is characterized in that, comprising:
For the each layer original log information of amendment system, make it possess the daily record custom block of user-defined format;
And for filtering the daily record filtering module of log information.
8. system according to claim 7, is characterized in that, described daily record filtering module comprises:
For the daily record configuration module of daily record configuration information is set;
For catching the daily record trapping module of log information;
For the daily record matching module that the log information of catching is mated with daily record configuration information;
And logger module for the result that meets matching condition is recorded.
9. system according to claim 8, is characterized in that, described daily record trapping module is integrated with dmesg and adblogcat order.
10. according to the system described in claim 7 or 8 or 9, it is characterized in that, this system also comprises the form diverter switch for log information is switched between unprocessed form and user-defined format.
CN201410157526.0A 2014-04-18 2014-04-18 Android log informations filter method and system Active CN103944761B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410157526.0A CN103944761B (en) 2014-04-18 2014-04-18 Android log informations filter method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410157526.0A CN103944761B (en) 2014-04-18 2014-04-18 Android log informations filter method and system

Publications (2)

Publication Number Publication Date
CN103944761A true CN103944761A (en) 2014-07-23
CN103944761B CN103944761B (en) 2018-01-26

Family

ID=51192258

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410157526.0A Active CN103944761B (en) 2014-04-18 2014-04-18 Android log informations filter method and system

Country Status (1)

Country Link
CN (1) CN103944761B (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105138606A (en) * 2015-08-03 2015-12-09 上海斐讯数据通信技术有限公司 Server log management method and system
CN106209405A (en) * 2015-05-06 2016-12-07 中国移动通信集团内蒙古有限公司 Method for diagnosing faults and device
CN106294723A (en) * 2016-08-10 2017-01-04 成都广达新网科技股份有限公司 A kind of apply in the quick inspection method of system journal of embedded device and system
CN108519923A (en) * 2018-03-01 2018-09-11 北京三快在线科技有限公司 A kind of interim card detection method and device and electronic equipment
CN109088859A (en) * 2018-07-16 2018-12-25 北京奇虎科技有限公司 Identify method, apparatus, server and the readable storage medium storing program for executing of suspicious object object
CN109213660A (en) * 2018-08-28 2019-01-15 郑州云海信息技术有限公司 A kind of log-output method and device based on filter condition
CN109905253A (en) * 2017-12-07 2019-06-18 航天信息股份有限公司 A kind of log information acquisition method and device
CN113221101A (en) * 2021-04-06 2021-08-06 中标软件有限公司 Method for realizing safety audit function based on android system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101093514A (en) * 2007-08-20 2007-12-26 中兴通讯股份有限公司 Processing system for automated testing log
CN101291256A (en) * 2008-06-02 2008-10-22 杭州华三通信技术有限公司 Method and system for upgrading system log to alarm
CN101414255A (en) * 2007-10-19 2009-04-22 国际商业机器公司 Method and apparatus for processing log event
US20130171960A1 (en) * 2011-12-29 2013-07-04 Anil Kandregula Systems, methods, apparatus, and articles of manufacture to measure mobile device usage
CN103544298A (en) * 2013-10-30 2014-01-29 曙光信息产业(北京)有限公司 Log analysis method and analysis device for component

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101093514A (en) * 2007-08-20 2007-12-26 中兴通讯股份有限公司 Processing system for automated testing log
CN101414255A (en) * 2007-10-19 2009-04-22 国际商业机器公司 Method and apparatus for processing log event
CN101291256A (en) * 2008-06-02 2008-10-22 杭州华三通信技术有限公司 Method and system for upgrading system log to alarm
US20130171960A1 (en) * 2011-12-29 2013-07-04 Anil Kandregula Systems, methods, apparatus, and articles of manufacture to measure mobile device usage
CN103544298A (en) * 2013-10-30 2014-01-29 曙光信息产业(北京)有限公司 Log analysis method and analysis device for component

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
彭智俊: "《用静态信息流分析检测Android应用中的日志隐患》", 《小型微型计算机系统》 *

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106209405A (en) * 2015-05-06 2016-12-07 中国移动通信集团内蒙古有限公司 Method for diagnosing faults and device
CN106209405B (en) * 2015-05-06 2019-11-08 中国移动通信集团内蒙古有限公司 Method for diagnosing faults and device
CN105138606A (en) * 2015-08-03 2015-12-09 上海斐讯数据通信技术有限公司 Server log management method and system
CN106294723A (en) * 2016-08-10 2017-01-04 成都广达新网科技股份有限公司 A kind of apply in the quick inspection method of system journal of embedded device and system
CN109905253A (en) * 2017-12-07 2019-06-18 航天信息股份有限公司 A kind of log information acquisition method and device
CN109905253B (en) * 2017-12-07 2022-05-17 航天信息股份有限公司 Log information acquisition method and device
CN108519923A (en) * 2018-03-01 2018-09-11 北京三快在线科技有限公司 A kind of interim card detection method and device and electronic equipment
CN109088859A (en) * 2018-07-16 2018-12-25 北京奇虎科技有限公司 Identify method, apparatus, server and the readable storage medium storing program for executing of suspicious object object
CN109213660A (en) * 2018-08-28 2019-01-15 郑州云海信息技术有限公司 A kind of log-output method and device based on filter condition
CN113221101A (en) * 2021-04-06 2021-08-06 中标软件有限公司 Method for realizing safety audit function based on android system

Also Published As

Publication number Publication date
CN103944761B (en) 2018-01-26

Similar Documents

Publication Publication Date Title
CN103944761A (en) Android log information filter method and system
CN109240886B (en) Exception handling method, exception handling device, computer equipment and storage medium
EP2875483B1 (en) Remote monitoring of medical devices
US8832148B2 (en) Enterprise evidence repository
CN109284251A (en) Blog management method, device, computer equipment and storage medium
CN108667725A (en) A kind of industrial AnyRouter and implementation method based on a variety of accesses and edge calculations
US20120102543A1 (en) Audit Management System
CN102355482B (en) Data transmission method and equipment thereof
CN111639066A (en) Data cleaning method and device
JP2013178825A (en) Laboratory instrumentation information management and control network
JP2006018810A5 (en)
Zavala et al. Adaptive monitoring: A systematic mapping
CN106775937A (en) A kind of order line method of calibration and device
CN104392297A (en) Method and system for realizing non-business process irregularity detection in large data environment
CN109462502A (en) Configuration information saves control method, device and the SDN controller of instruction
CN111400288A (en) Data quality inspection method and system
CN105187241A (en) Log recording method and system based on linux kernel
CN106254109A (en) Log collection method, Log Collect System and server
CN102819488B (en) Test processes device and test processing method
CN104933077B (en) Rule-based multifile information analysis method
CN101222351A (en) Method and device for acquiring performance data files
CN104766108A (en) Optimizing processing method for FID electronic tag in BIM model
CN108897633A (en) A kind of method for diagnosing faults and device based on machine data
CN104038388A (en) Distributed automatic testing system and automatic testing method for Internet of Things
CN114157662B (en) Cloud platform parameter adaptation method, device, terminal equipment and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant