CN109086157A - Log method for tracing, device, electronic equipment and storage medium - Google Patents
Log method for tracing, device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN109086157A CN109086157A CN201810871673.2A CN201810871673A CN109086157A CN 109086157 A CN109086157 A CN 109086157A CN 201810871673 A CN201810871673 A CN 201810871673A CN 109086157 A CN109086157 A CN 109086157A
- Authority
- CN
- China
- Prior art keywords
- configuration file
- log
- target
- class
- original configuration
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/0703—Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
- G06F11/0766—Error or fault reporting or storing
- G06F11/0775—Content or structure details of the error report, e.g. specific table structure, specific error fields
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/0703—Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
- G06F11/0766—Error or fault reporting or storing
- G06F11/0781—Error filtering or prioritizing based on a policy defined by the user or on a policy defined by a hardware/software module, e.g. according to a severity level
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/0703—Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
- G06F11/079—Root cause analysis, i.e. error or fault diagnosis
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Health & Medical Sciences (AREA)
- Biomedical Technology (AREA)
- Debugging And Monitoring (AREA)
Abstract
Present disclose provides a kind of log method for tracing, device, electronic equipment and storage mediums, comprising: obtains the original configuration file of target class under operation;Original configuration file is replaced with into preset target configuration file, wherein target configuration file includes tracking mechanism, and tracking mechanism is used to collect the operation attribute of target class;Trace log is generated according to operation attribute.The disclosure is by replacing original configuration file for target configuration file, so that target configuration file generates trace log according to operation attribute, realize can precise positioning to mobile application system operation problem, not only reduce the workload of technological development personnel, and so that technological development personnel is found in time and solve operation problem, to improve stability of the mobile applications in Android system and user to the experience sense of mobile applications.
Description
Technical field
This disclosure relates to computer application field, especially a kind of log method for tracing, device, electronic equipment and storage are situated between
Matter.
Background technique
In internet exploitation, especially in mobile applications exploitation, frequently encounters system fragmentation and cause to move
The serious problems of application crash, for example, mobile applications are forcibly closed by system bullet frame.Alternatively, even if will simulate
The mobile applications of operational excellence are installed on the mobile phone of user in use, since complicated network environment can also exist on device
System crash problem significantly impacts the system stability of mobile applications.
In the related technology, mobile applications Android system operate normally when, all can record log information, if encountered
System, which runs quickly to burst, waits abnormal problems, and technological development personnel can search and solve Android system by analyzing log information and currently deposit
The problem of.However, existing log information file has a large amount of useless log informations, technological development personnel are not only increased
Workload, and the problem of bursting of running quickly for occur is unable to get timely solution, influences mobile applications in Android system
Stability, to influence user to the experience sense of mobile process.
Summary of the invention
To overcome the problems in correlation technique, the disclosure provide a kind of log method for tracing, device, electronic equipment and
Storage medium.
According to the first aspect of the embodiments of the present disclosure, a kind of log method for tracing is provided, comprising:
The original configuration file of target class is obtained under operation;
The original configuration file is replaced with into preset target configuration file, wherein the target configuration file includes
Tracking mechanism, the tracking mechanism are used to collect the operation attribute of the target class;
Trace log is generated according to the operation attribute.
Optionally, the original configuration file of the target class includes activity management class, test base class, assures reason class and view
Root.
Optionally, the original configuration file of acquisition target class includes: under operation
Obtain the attribute information of the original configuration file of target class;
The path of the original configuration file is obtained according to the attribute information;
The original configuration file is obtained according to the path.
Optionally, the original configuration file is replaced with preset target configuration file includes:
Obtain the component and code block in the target configuration file;
Using Java reflection mechanism by the activity management class, the test base class and it is described assure reason class it is corresponding
Data packet replaces with the component;
The code block is injected to the view chromosome, changes the variable of the view chromosome.
Optionally, generating trace log according to the operation attribute includes:
Create a trace log table;
Scan and read the operation attribute of the target class;
By the operation attribute record of the target class in the trace log table, the trace log is obtained.
Optionally, after the original configuration file being replaced with preset target configuration file, the log tracking side
Method further include:
Detecting the trace log in preset investigation information table whether there is general error information;
If there are the general error informations for the trace log, it is automatically repaired the general error information;
If the general error information is not present in the trace log, mark processing to the trace log.
Optionally, after generating trace log according to the operation attribute, log method for tracing further include:
Within a preset time, the processed trace log of label is sent to pipe according to preset advice method
Reason person's terminal.
According to the second aspect of an embodiment of the present disclosure, a kind of log follow-up mechanism is provided, comprising:
Acquiring unit is configured as obtaining the original configuration file of target class under operation;
Processing unit is configured as the original configuration file replacing with preset target configuration file, wherein described
Target configuration file includes tracking mechanism, and the tracking mechanism is used to collect the operation attribute of the target class;
Execution unit is configured as generating trace log according to the operation attribute.
Optionally, the original configuration file of the target class includes activity management class, test base class, assures reason class and view
Root.
Optionally, the log follow-up mechanism further include:
First acquisition unit is configured as obtaining the attribute information of the original configuration file of target class;
First processing units are configured as obtaining the path of the original configuration file according to the attribute information;
First execution unit is configured as obtaining the original configuration file according to the path.
Optionally, the log follow-up mechanism further include:
Second acquisition unit is configured as obtaining component and code block in the target configuration file;
The second processing unit, be configured as using Java reflection mechanism by the activity management class, the test base class and
The corresponding data packet of reason class of assuring replaces with the component;
Second execution unit is configured as injecting the code block to the view chromosome, changes the variable of the view chromosome.
Optionally, the log follow-up mechanism further include:
Creating unit is configured as the log table that creates a trace;
Scanning element is configured as scanning and reading the operation attribute of the target class;
Recording unit is configured as the operation attribute record of the target class in the trace log table, obtains
The trace log.
Optionally, the log follow-up mechanism further include:
Detection unit is configured as detecting the trace log with the presence or absence of the letter that generally reports an error in preset investigation information table
Breath;
It repairs unit and is automatically repaired described one if being configured as the trace log there are the general error information
As report an error letter;
Marking unit, if being configured as the trace log, there is no the general error informations, to the tracking day
Will is marked processing.
Optionally, the log follow-up mechanism further include:
Transmission unit is configured as within a preset time, by the processed trace log of label according to default
Advice method be sent to administrator terminal.
According to the third aspect of an embodiment of the present disclosure, a kind of electronic equipment, including processor are provided;For storage processor
The memory of executable instruction;Wherein, the processor is configured to the step of above-mentioned log method for tracing.
According to a fourth aspect of embodiments of the present disclosure, a kind of non-transitorycomputer readable storage medium is provided, when described
When instruction in storage medium is executed by the processor of mobile terminal, so that mobile terminal is able to carry out above-mentioned log method for tracing
The step of.
The 5th aspect that embodiment is disclosed according to the application, provides a kind of computer program product, including computer program
Code, the computer program include program instruction, when described program instruction is computer-executed, execute the computer
The step of above-mentioned log method for tracing.
The technical scheme provided by this disclosed embodiment can include the following benefits: obtain target under operation
The original configuration file of class;Original configuration file is replaced with into preset target configuration file, wherein target configuration file includes
Tracking mechanism, tracking mechanism are used to collect the operation attribute of target class;Trace log is generated according to operation attribute.The disclosure passes through
Target configuration file is replaced into original configuration file, so that target configuration file generates trace log according to operation attribute, is realized
Can precise positioning to mobile application system operation problem so that system manager can have found and solve operation to ask in time
Topic, so that the stability for improving mobile application system and user are to the experience senses of mobile applications.
It should be understood that above general description and following detailed description be only it is exemplary and explanatory, not
The disclosure can be limited.
Detailed description of the invention
The drawings herein are incorporated into the specification and forms part of this specification, and shows the implementation for meeting the application
Example, and together with specification for explaining the principles of this disclosure.
Fig. 1 is a kind of flow chart of log method for tracing shown according to an exemplary embodiment.
Fig. 2 is a kind of embodiment flow chart shown according to an exemplary embodiment for obtaining original configuration file.
Fig. 3 is that original configuration file shown according to an exemplary embodiment replaces with the one of preset target configuration file
Kind embodiment flow chart.
Fig. 4 is a kind of embodiment flow chart shown according to an exemplary embodiment for generating trace log.
Fig. 5 is a kind of embodiment flow chart of processing trace log shown according to an exemplary embodiment.
Fig. 6 is a kind of log follow-up mechanism block diagram shown according to an exemplary embodiment.
Fig. 7 is a kind of block diagram of mobile terminal shown according to an exemplary embodiment.
Fig. 8 is the block diagram of a kind of electronic equipment shown according to an exemplary embodiment.
Specific embodiment
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to
When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment
Described in embodiment do not represent all implementations consistent with this disclosure.On the contrary, they be only with it is such as appended
The example of some aspects be described in detail in claims, the disclosure consistent device and log method for tracing.
Fig. 1 is a kind of flow chart of log method for tracing shown according to an exemplary embodiment, as shown in Figure 1, log
Method for tracing is in terminal, comprising the following steps:
S100: the original configuration file of target class is obtained under operation.
Specifically, for mobile applications under Android system running environment, server-side obtains the target class in Android system
Original configuration file, wherein the various components in original configuration file packet Android system, for example, activity management class
(ActivityManagerService), base class (Instrumetation) is tested, reason class (PackageManage) is assured and regards
Figure root (ViewRootImpl).
Since the original configuration file of acquisition is four big class files important in Android system, and original configuration file
Function includes communication, distribution and event transmitting etc., these functions are of great significance to the tracking of Android system to the problem of bursting,
Therefore before replacing preset target configuration file, need first to obtain original configuration file.
S200: original configuration file is replaced with into preset target configuration file, wherein target configuration file includes tracking
Mechanism, tracking mechanism are used to collect the operation attribute of target class.
Specifically, tracking mechanism includes that application signature mechanism, rights statements mechanism, access control mechanisms, process are logical
Letter mechanism and memory management mechanism enable tracking mechanism to track and collect the operation attribute of target class.
The operation attribute of target class include application program forcibly close, application program without response, serious error it is abnormal, harsh
Mode exception, low memory abnormal, system service are switched on without response, network state exception, battery discharge exception, system exception, are
System abnormal restarting, kernel fault, system retrieving layer exception or local process are abnormal.
Wherein, application program forcibly close (ForceClose also makees crash), typically occur in when in Java code go out
Existing exception at large;Application program typically occurs in application without response (ApplicationNotResponding, ANR)
When the main thread of program fails to obtain response for a long time;Serious error is abnormal (WhataTerribleFailure, WTF), usually
It appears in and currently has found very serious problem;Harsh mode is abnormal (StrictModeViolation), typically occurs in monitoring
To should not be executed in main thread network, file when;Memory abnormal (lowmemory also makees lowmem), typically occurs in
When low memory;System service typically occurs in watchdog (house dog) and monitors system service (system_ without response
When server) without response;Network state is abnormal (netstats_error), typically occurs in and encounters apparent network state mistake
When.
Original configuration file is replaced with preset target according to the corresponding path of original configuration file of acquisition by server-side
Configuration file enables and preferably more accurately tracks fortune of the mobile applications in Android system according to target configuration file
Row state.
S300: trace log is generated according to operation attribute.
Server-side detects operating status of the target mobile applications in Android system, is tracked according to target configuration file
Operation attribute, by the corresponding operation attribute record of operating status in trace log, trace log have recorded target movement answer
The problem of bursting of running quickly encountered when being run within a preset period of time with program.
By the original configuration file for obtaining target class under operation;Original configuration file is replaced with into preset mesh
Mark configuration file, wherein target configuration file includes tracking mechanism, and tracking mechanism is used to collect the operation attribute of target class;Root
Trace log is generated according to operation attribute.The disclosure is by replacing original configuration file for target configuration file, so that target configures
File according to operation attribute generate trace log, realize can precise positioning to mobile application system operation problem, not only
The workload of technological development personnel is reduced, and so that technological development personnel is found in time and solves operation problem, to improve
Stability of the mobile applications in Android system.
In some embodiments, the original configuration file of target class includes activity management class, tests base class, assures reason class
With view root.
Specifically, activity management class is all movable components that client is used to be currently running in management system
It (Activity) include the tool of the information such as task (Task), memory (Memory), service (Service).In activity management class
In have a large amount of get () method, various information can be collected, and provide information to application management system, by application management system
It goes to complete interactive and traffic control;In movable component in Android system, all events require to test base by middleware
Class, which is done, distributes;In the inquiry package informatin of Android system, require by assuring reason class as intermediate distributor;Android system is in UI
Draw or event transmittance process in, can all be related to the distribution of view root, that is to say, that it is all shown on interface all want
By view root.
Referring to Fig. 2, Fig. 2 is a kind of embodiment flow chart of the acquisition original configuration file shown in the present embodiment.Such as
Shown in Fig. 2, step S100 includes:
S101: the attribute information of the original configuration file of target class is obtained.
The attribute information of original configuration file includes configuration folder title, access authority, access catalogue number of plies etc..Its
In, access authority is according to the identity of user and its member identities in various predefined groups, and limitation accesses certain letters
The mechanism for ceasing item or certain controls is used to control customer access network resource by system manager, such as server, catalogue and file
Deng access, and usually realized by the permission for authorizing access special object to user and group.
S102: the path of original configuration file is obtained according to attribute information.
Server-side according in attribute information folder name and the access target number of plies obtain original configuration file
The store path of path, the path i.e. original configuration file.
S103: original configuration file is obtained according to path.
Server-side is according to the position of path orientation to original configuration file;It is beaten according to the access authority in attribute information
The Miscellaneous Documents on original configuration file are opened, and obtain that activity management class, test base class, assuring reason, class and view root etc. are original matches
Set file.
By obtaining the attribute information of the original configuration file of target class, original configuration file is obtained according to attribute information
Path obtains original configuration file according to path, makes it possible to more accurately obtain original configuration file, replaces original match for after
File is set to be ready.
Referring to Fig. 3, Fig. 3 replaces with the one of preset target configuration file for the original configuration file shown in the present embodiment
Kind embodiment flow chart.As shown in figure 3, step S200 includes:
S201: the component and code block in target configuration file are obtained.
Component and code block in target configuration file are the improved configuration texts of basic characteristic according to original configuration file
Part, the configuration file are responsible for the problem of bursting of running quickly that monitoring tracking target mobile applications occur in Android system operation.Component packet
The attribute and method of preset class or object are included, code block includes preset parameter value, which works as replacing
The variate-value being related in the preceding problem of bursting of running quickly.
Server-side is searched according to the store path of target configuration file and securing component and code block.
Specifically, the store path of target configuration file is the preset path established on Android system in advance;It will improve
Target configuration text copy the target configuration file of preset path to according to preset file format where in file.It is preset
File format includes: for example, target configuration file is converted into document files JAR, image file ISO or executable file
EXE etc..
S202: the corresponding data packet of reason class by activity management class, test base class and is assured using Java reflection mechanism
Replace with component.
Java reflection mechanism is, for any one class, can to obtain such corresponding all category in operating status
Property and method;For any one object, its any means and attribute can be called;This dynamic acquisition information and dynamic
The function of state calling object method is known as the reflection mechanism of Java language.
Data packet includes the attribute and object of the attribute of the corresponding class of original configuration file, the method for class, object
Method.
Server-side passes through Java reflection mechanism for activity management class, test base class data packet corresponding with reason class is assured
Component is replaced with, that is, has modified the category of the method for class in original configuration file, the attribute of class, the method for object or object
Property etc..
S203: to view chromosome injecting codes block, change the variable of view chromosome.
By for example, code block is the ID variate-value for modifying view root, being become by change ID to view root injecting codes block
Magnitude is prevented when non-mobile application exits, and prevents that viewstate from not saving or viewstate saves exception error
Problem.
By using Java reflection mechanism, by activity management class, test base class data packet corresponding with reason class is assured
The component and code block in target configuration file are replaced with, the replacement to original configuration file is completed, is mentioned for tracking to the problem of bursting
Basic condition is supplied.
Referring to Fig. 4, Fig. 4 is a kind of embodiment flow chart of the generation trace log shown in the present embodiment.Such as Fig. 4 institute
Show, step S300 includes:
S301: create a trace log table.
Specifically, the behaviour in server-side real-time tracking detection Android system, when server-side detects that target is mobile
Application program is when there is running quickly the problem of bursting under Android system is run, for example, mobile applications, which run quickly to burst, to be led to compulsory withdrawal, be switched on
Target mobile applications delay of response is immediately opened afterwards even forcibly closes or detect that the multi-pass operation behavior of user is led
Mobile applications are caused to be in Caton state etc., server-side automatically generates a trace log according to the problem of bursting of running quickly detected
Table.Wherein, the field name on trace log table includes the time, and state, class name, early warning tag types and operation belong to
Property etc..
S302: scanning and reads the operation attribute of target class.
Server-side scanning includes activity management class, test base class, the operating status for assuring the reason target class such as class and view root;
The operation attribute of target class is filtered out from operating status;The operation attribute for reading target class, to avoid having read target class
Normal operating condition, more effectively capture run quickly burst problem.
Specifically, the operation attribute of target class carries early warning label, facilitates to filter out to have to run quickly in operating status and burst
The operation attribute of problem characteristic.Different types of operation attribute carries different early warning labels, so that server-side is according to early warning mark
Label carry out Classifying Sum to operation attribute.For example, it is pre- to set level-one for the program positive closing in the operation attribute of target class
Alert label, system service is second level early warning label without response and the local exception that carries out is three-level early warning label etc..
S303: by the operation attribute record of target class in trace log table, trace log is obtained.
Corresponding time, operation attribute are corresponding when reading by the operation attribute of Classifying Sum, state, generation operation attribute
Class etc. run quickly information of bursting;Information of bursting of running quickly is automatically write according to the field name of trace log table, target movement is finally obtained and answers
With the trace log of program.
Operation attribute record by that will read target class obtains the mistake of trace log in the trace log table of creation
Cheng Zhong can preferably feed back the problem of bursting of running quickly of target mobile applications, be conducive to preferably tracking to the problem of bursting.
Referring to Fig. 5, Fig. 5 is a kind of embodiment flow chart of the processing trace log shown in the present embodiment.Such as Fig. 5
It is shown, after executing step S200, log method for tracing further include:
S210: it whether there is general error information in preset investigation information table detection trace log.
General error information is the description to the problem of bursting of running quickly frequently occurred, and such problem of bursting of running quickly generally is automatically repaired
Solution.
Specifically, preset investigation information table has recorded the solution of common fault information and common fault information.
S220: if there are general error informations for trace log, it is automatically repaired general error information.
If trace log has operation attribute identical with general error information, according to one recorded on investigation information table
As error message solution, call the corresponding data packet of solution;By the program code in parsing data packet, thus
Realization is automatically repaired common fault information.
S230: it if general error information is not present in trace log, marks processing to trace log.
Specifically, label processing can be, and the operation attribute of non-common fault information is marked, such as the side of label
Formula includes but is not limited to that special early warning label or mark signal message etc. to be processed is arranged.
If by detecting trace log in preset investigation information table, there are general error informations, are automatically repaired general report
Otherwise wrong information makes marks processing to trace log, be conducive to quickly solve the problems, such as to run quickly to burst, reduce the work of technological development personnel
It measures.
After executing step S300, log method for tracing is specific further include: within a preset time, will mark processed
Trace log is sent to administrator terminal according to preset advice method.
Specifically, preset time can be freely arranged, for example, the daily working time, or per hour etc.;It is preset logical
Know that mode includes but is not limited to information notice of mail, short message or management system etc..
Be conducive to by the terminal that the processed trace log of label that will be recognized is sent to administrator mobile to target
The immediate feedback of the problem of bursting of running quickly of application program enables administrator to solve the operation attribute on trace log in time, makes mesh
Mark application program is preferably safeguarded.
Fig. 6 is a kind of log follow-up mechanism block diagram shown according to an exemplary embodiment.Referring to Fig. 6, log tracking
Device includes acquiring unit 110, processing unit 120 and execution unit 130.Wherein, acquiring unit 110 are configured as running
The original configuration file of target class is obtained under state;Processing unit 120 is configured as replacing with original configuration file preset
Target configuration file, wherein target configuration file includes tracking mechanism, and tracking mechanism is used to collect the operation attribute of target class;
Execution unit 130 is configured as generating trace log according to operation attribute.
In some embodiments, the original configuration file of target class includes activity management class, tests base class, assures reason class
With view root.
In some embodiments, log follow-up mechanism further includes that first acquisition unit, first processing units and first are held
Row unit.Wherein, first acquisition unit is configured as obtaining the attribute information of the original configuration file of target class;First processing
Unit is configured as obtaining the path of original configuration file according to attribute information;First execution unit, is configured as according to path
Obtain original configuration file.
In some embodiments, log follow-up mechanism further includes that second acquisition unit, the second processing unit and second are held
Row unit.Wherein, second acquisition unit is configured as obtaining the component and code block in target configuration file;Second processing list
Member is configured as replacing activity management class, test base class data packet corresponding with reason class is assured using Java reflection mechanism
It is changed to component;Second execution unit is configured as changing the variable of view chromosome to view chromosome injecting codes block.
In some embodiments, log follow-up mechanism further includes creating unit, scanning element and recording unit.Wherein,
Creating unit is configured as the log table that creates a trace;Scanning element is configured as scanning and reading the operation category of target class
Property;Recording unit is configured as the operation attribute record by target class in trace log table, obtains trace log.
In some embodiments, log follow-up mechanism further include: detection unit repairs unit and marking unit.Wherein,
Detection unit, it is configured as detecting trace log with the presence or absence of general error information in preset investigation information table;It repairs single
Member is automatically repaired the letter that generally reports an error if being configured as trace log there are general error information;Marking unit is configured as
If general error information is not present in trace log, mark processing to trace log.
In some embodiments, log follow-up mechanism further includes transmission unit, is configured as within a preset time, to mark
Remember that processed trace log is sent to administrator terminal according to preset advice method.
About the log follow-up mechanism in above-described embodiment, the concrete mode that wherein each unit executes operation is having
It closes and is described in detail in the embodiment of this method, no detailed explanation will be given here.
Fig. 7 is a kind of block diagram of mobile terminal 700 for log tracking shown according to an exemplary embodiment.Example
Such as, mobile terminal 700 can be mobile phone, computer, digital broadcasting terminal, messaging device, game console, plate
Equipment, Medical Devices, body-building equipment, personal digital assistant etc..
Referring to Fig. 7, mobile terminal 700 may include following one or more components: processing component 702, memory 704,
Electric power assembly 706, multimedia component 708, audio component 710, the interface 712 of input/output (I/O), sensor module 714,
And communication component 716.
The integrated operation of the usually control mobile terminal 700 of processing component 702, such as with display, call, data are logical
Letter, camera operation and record operate associated operation.Processing component 702 may include one or more processors 720 to hold
Row instruction, to complete all or part of the steps of above-mentioned log method for tracing.In addition, processing component 702 may include one
Or multiple modules, convenient for the interaction between processing component 702 and other assemblies.For example, processing component 702 may include multimedia
Module, to facilitate the interaction between multimedia component 708 and processing component 702.
Memory 704 is configured as storing various types of data to support the operation in mobile terminal 700.These data
Example include any application program or log method for tracing for being operated on mobile terminal 700 instruction, contact number
According to, telephone book data, message, picture, video etc..Memory 704 can be by any kind of volatibility or non-volatile memories
Equipment or their combination are realized, such as static random access memory (SRAM), electrically erasable programmable read-only memory
(EEPROM), Erasable Programmable Read Only Memory EPROM (EPROM), programmable read only memory (PROM), read-only memory
(ROM), magnetic memory, flash memory, disk or CD.
Power supply module 706 provides electric power for the various assemblies of mobile terminal 700.Power supply module 706 may include power supply pipe
Reason system, one or more power supplys and other with for mobile terminal 700 generate, manage, and distribute the associated component of electric power.
Multimedia component 708 includes the screen of one output interface of offer between the mobile terminal 700 and user.
In some embodiments, screen may include liquid crystal display (LCD) and touch panel (TP).If screen includes touch surface
Plate, screen may be implemented as touch screen, to receive input signal from the user.Touch panel includes one or more touches
Sensor is to sense the gesture on touch, slide, and touch panel.The touch sensor can not only sense touch or sliding
The boundary of movement, but also detect duration and pressure associated with the touch or slide operation.In some embodiments,
Multimedia component 708 includes a front camera and/or rear camera.When equipment 700 is in operation mode, as shot mould
When formula or video mode, front camera and/or rear camera can receive external multi-medium data.Each preposition camera shooting
Head and rear camera can be a fixed optical lens system or have focusing and optical zoom capabilities.
Audio component 710 is configured as output and/or input audio signal.For example, audio component 710 includes a Mike
Wind (MIC), when mobile terminal 700 is in operation mode, when such as call mode, recording mode, and voice recognition mode, microphone
It is configured as receiving external audio signal.The received audio signal can be further stored in memory 704 or via logical
Believe that component 716 is sent.In some embodiments, audio component 710 further includes a loudspeaker, is used for output audio signal.
I/O interface 712 provides interface between processing component 702 and peripheral interface module, and above-mentioned peripheral interface module can
To be keyboard, click wheel, button etc..These buttons may include, but are not limited to: home button, volume button, start button and lock
Determine button.
Sensor module 714 includes one or more sensors, for providing the state of various aspects for mobile terminal 700
Assessment.For example, sensor module 714 can detecte the state that opens/closes of equipment 700, the relative positioning of component, such as institute
The display and keypad that component is mobile terminal 700 are stated, sensor module 714 can also detect mobile terminal 700 or mobile
The position change of 700 1 components of terminal, the existence or non-existence that user contacts with mobile terminal 700,700 orientation of mobile terminal
Or the temperature change of acceleration/deceleration and mobile terminal 700.Sensor module 714 may include proximity sensor, be configured to
It detects the presence of nearby objects without any physical contact.Sensor module 714 can also include optical sensor, such as
CMOS or ccd image sensor, for being used in imaging applications.In some embodiments, which can be with
Including acceleration transducer, gyro sensor, Magnetic Sensor, pressure sensor or temperature sensor.
Communication component 716 is configured to facilitate the communication of wired or wireless way between mobile terminal 700 and other equipment.
Mobile terminal 700 can access the wireless network based on communication standard, such as WiFi, carrier network (such as 2G, 3G, 4G or 5G),
Or their combination.In one exemplary embodiment, communication component 716 receives via broadcast channel and comes from external broadcasting management
The broadcast singal or broadcast related information of system.In one exemplary embodiment, the communication component 716 further includes that near field is logical
(NFC) module is believed, to promote short range communication.For example, radio frequency identification (RFID) technology, infrared data association can be based in NFC module
Meeting (IrDA) technology, ultra wide band (UWB) technology, bluetooth (BT) technology and other technologies are realized.
In the exemplary embodiment, mobile terminal 700 can be by one or more application specific integrated circuit (ASIC), number
Word signal processor (DSP), digital signal processing appts (DSPD), programmable logic device (PLD), field programmable gate array
(FPGA), controller, microcontroller, microprocessor or other electronic components are realized, for executing above-mentioned log method for tracing.
In the exemplary embodiment, a kind of non-transitorycomputer readable storage medium including instruction, example are additionally provided
It such as include the memory 704 of instruction, above-metioned instruction can be executed by the processor 720 of mobile terminal 700 and be chased after with completing above-mentioned log
Track method.For example, the non-transitorycomputer readable storage medium can be ROM, random access memory (RAM), CD-
ROM, tape, floppy disk and optical data storage devices etc..
Fig. 8 is a kind of block diagram of electronic equipment 800 for log tracking shown according to an exemplary embodiment.Example
Such as, electronic equipment 800 may be provided as a server.Referring to Fig. 8, electronic equipment 800 includes processing component 822, into one
Step includes one or more processors, and the memory resource as representated by memory 832, and being used to store can be by processing component
The instruction of 822 execution, such as application program.The application program stored in memory 832 may include one or more
Each correspond to one group of instruction module.In addition, processing component 822 is configured as executing instruction, to execute above-mentioned log
Method for tracing.
Electronic equipment 800 can also include that a power supply module 826 is configured as executing the power supply pipe of electronic equipment 800
Reason, a wired or wireless network interface 850 are configured as electronic equipment 800 being connected to network and an input and output (I/
O) interface 858.Electronic equipment 800 can be operated based on the operating system for being stored in memory 832, such as Windows
ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM or similar.
A kind of computer program product, including computer program code, the computer program include program instruction, work as institute
When stating program instruction and being computer-executed, the computer is made to execute above-mentioned log method for tracing.
Those skilled in the art consider specification and practice it is disclosed herein after, will readily occur to other implementations of the disclosure
Scheme.This application is intended to cover any variations, uses, or adaptations of the disclosure, these modifications, purposes or adaptation
Property variation follow the general principles of this disclosure and including the undocumented common knowledge in the art of the disclosure or usual
Technological means.The description and examples are only to be considered as illustrative, and the true scope and spirit of the disclosure are wanted by following right
It asks and points out.
It should be understood that the present disclosure is not limited to the precise structures that have been described above and shown in the drawings, and
And various modifications and changes may be made without departing from the scope thereof.The scope of the present disclosure is only limited by the accompanying claims.
Claims (10)
1. a kind of log method for tracing characterized by comprising
The original configuration file of target class is obtained under operation;
The original configuration file is replaced with into preset target configuration file, wherein the target configuration file includes tracking
Mechanism, the tracking mechanism are used to collect the operation attribute of the target class;
Trace log is generated according to the operation attribute.
2. log method for tracing according to claim 1, which is characterized in that the original configuration file of the target class includes
Activity management class, assures reason class and view root at test base class.
3. log method for tracing according to claim 1, which is characterized in that described to obtain target class under operation
Original configuration file includes:
Obtain the attribute information of the original configuration file of target class;
The path of the original configuration file is obtained according to the attribute information;
The original configuration file is obtained according to the path.
4. log method for tracing according to claim 2, which is characterized in that described to replace with the original configuration file
Preset target configuration file includes:
Obtain the component and code block in the target configuration file;
The activity management class, the test base class and described assure are managed by the corresponding data of class using Java reflection mechanism
Packet replaces with the component;
The code block is injected to the view chromosome, changes the variable of the view chromosome.
5. log method for tracing according to claim 1, which is characterized in that described generated according to the operation attribute is tracked
Log includes:
Create a trace log table;
Scan and read the operation attribute of the target class;
By the operation attribute record of the target class in the trace log table, the trace log is obtained.
6. log method for tracing according to claim 5, which is characterized in that state the original configuration file is replaced with it is pre-
If target configuration file after, the log method for tracing includes:
Detecting the trace log in preset investigation information table whether there is general error information;
If there are the general error informations for the trace log, it is automatically repaired the general error information;
If the general error information is not present in the trace log, mark processing to the trace log.
7. log method for tracing according to claim 6, which is characterized in that described generated according to the operation attribute is tracked
After log, the log method for tracing includes:
Within a preset time, the processed trace log of label is sent to administrator according to preset advice method
Terminal.
8. a kind of log follow-up mechanism characterized by comprising
Acquiring unit is configured as obtaining the original configuration file of target class under operation;
Processing unit is configured as the original configuration file replacing with preset target configuration file, wherein the target
Configuration file includes tracking mechanism, and the tracking mechanism is used to collect the operation attribute of the target class;
Execution unit is configured as generating trace log according to the operation attribute.
9. a kind of electronic equipment characterized by comprising
Processor;
Memory for storage processor executable instruction;
Wherein, the processor is configured to as described in any one of claims 1 to 7 claim log method for tracing step
Suddenly.
10. a kind of non-transitorycomputer readable storage medium, when the instruction in the storage medium is by the processing of mobile terminal
When device executes, so that mobile terminal is able to carry out the log method for tracing as described in any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810871673.2A CN109086157B (en) | 2018-08-02 | 2018-08-02 | Log tracking method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810871673.2A CN109086157B (en) | 2018-08-02 | 2018-08-02 | Log tracking method and device, electronic equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109086157A true CN109086157A (en) | 2018-12-25 |
CN109086157B CN109086157B (en) | 2022-03-25 |
Family
ID=64833372
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810871673.2A Active CN109086157B (en) | 2018-08-02 | 2018-08-02 | Log tracking method and device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109086157B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111352760A (en) * | 2020-02-27 | 2020-06-30 | 深圳市腾讯网域计算机网络有限公司 | Data processing method and related device |
CN111782522A (en) * | 2020-06-29 | 2020-10-16 | Oppo广东移动通信有限公司 | Output method of trace message, electronic device and storage medium |
CN116701134A (en) * | 2022-10-14 | 2023-09-05 | 荣耀终端有限公司 | Data processing method and electronic equipment |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103123601A (en) * | 2011-11-17 | 2013-05-29 | 北京神州泰岳软件股份有限公司 | Software development troubleshooting method and device based on Symbian system |
CN104239054A (en) * | 2014-09-12 | 2014-12-24 | 广州市久邦数码科技有限公司 | Android-system-based plug-in loading method and system |
CN106897609A (en) * | 2015-12-17 | 2017-06-27 | 北京奇虎科技有限公司 | The method and device that a kind of application program to dynamic load is monitored |
CN107491383A (en) * | 2017-08-17 | 2017-12-19 | 杭州师范大学 | Catching method, device and the mobile terminal of application crashes Operation Log |
CN107577579A (en) * | 2017-09-15 | 2018-01-12 | 通鼎互联信息股份有限公司 | A kind of log recording method and device |
CN107660283A (en) * | 2015-04-03 | 2018-02-02 | 甲骨文国际公司 | For realizing the method and system of daily record resolver in Log Analysis System |
-
2018
- 2018-08-02 CN CN201810871673.2A patent/CN109086157B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103123601A (en) * | 2011-11-17 | 2013-05-29 | 北京神州泰岳软件股份有限公司 | Software development troubleshooting method and device based on Symbian system |
CN104239054A (en) * | 2014-09-12 | 2014-12-24 | 广州市久邦数码科技有限公司 | Android-system-based plug-in loading method and system |
CN107660283A (en) * | 2015-04-03 | 2018-02-02 | 甲骨文国际公司 | For realizing the method and system of daily record resolver in Log Analysis System |
CN106897609A (en) * | 2015-12-17 | 2017-06-27 | 北京奇虎科技有限公司 | The method and device that a kind of application program to dynamic load is monitored |
CN107491383A (en) * | 2017-08-17 | 2017-12-19 | 杭州师范大学 | Catching method, device and the mobile terminal of application crashes Operation Log |
CN107577579A (en) * | 2017-09-15 | 2018-01-12 | 通鼎互联信息股份有限公司 | A kind of log recording method and device |
Non-Patent Citations (2)
Title |
---|
HUOHU1007: "Android将程序崩溃信息保存到本地文件", 《HTTPS://BLOG.CSDN.NET/HUOHU1007/ARTICLE/DETAILS/51423206》 * |
王文宇: "文件运动轨迹追踪技术的研究及实现", 《计算机系统应用》 * |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111352760A (en) * | 2020-02-27 | 2020-06-30 | 深圳市腾讯网域计算机网络有限公司 | Data processing method and related device |
CN111782522A (en) * | 2020-06-29 | 2020-10-16 | Oppo广东移动通信有限公司 | Output method of trace message, electronic device and storage medium |
CN111782522B (en) * | 2020-06-29 | 2023-10-24 | 哲库科技(北京)有限公司 | Tracking message output method, electronic device and storage medium |
CN116701134A (en) * | 2022-10-14 | 2023-09-05 | 荣耀终端有限公司 | Data processing method and electronic equipment |
CN116701134B (en) * | 2022-10-14 | 2024-05-17 | 荣耀终端有限公司 | Data processing method and electronic equipment |
Also Published As
Publication number | Publication date |
---|---|
CN109086157B (en) | 2022-03-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20210042170A9 (en) | Automatic registration of empty pointers | |
CN111176960B (en) | User operation behavior tracking method, device, equipment and storage medium | |
CN110546619B (en) | Method, system and medium for automatically determining whether a detected problem is bug | |
WO2020237877A1 (en) | Log monitoring method and apparatus, terminal, and storage medium | |
WO2015049420A1 (en) | Metering user behaviour and engagement with user interface in terminal devices | |
CN108804299A (en) | Application exception processing method and processing device | |
CN109086157A (en) | Log method for tracing, device, electronic equipment and storage medium | |
US11934426B2 (en) | Intelligently identifying a user's relationship with a document | |
WO2022231777A1 (en) | Notifications regarding updates to collaborative content | |
CN111143100A (en) | Memory leak detection method, device, equipment and storage medium | |
CN105574150A (en) | Data processing method and device | |
CN107609402B (en) | Security vulnerability processing method and device and storage medium | |
CN109254908A (en) | Visualize regression testing method, device, terminal device and readable storage medium storing program for executing | |
CN111813932A (en) | Text data processing method, text data classification device and readable storage medium | |
CN110347565A (en) | A kind of exception analysis method and device, electronic equipment of application program | |
CA3211911A1 (en) | Systems and methods for creating, training, and evaluating models, scenarios, lexicons, and policies | |
CN116069612A (en) | Abnormality positioning method and device and electronic equipment | |
CN113094225B (en) | Abnormal log monitoring method and device and electronic equipment | |
CN116401704A (en) | Sensitive data identification method, electronic equipment and storage medium | |
CN114968960A (en) | Log processing method and device, computer equipment and storage medium | |
CN111104576A (en) | Processing method, device and system for webpage identification and electronic equipment | |
CN114201750A (en) | Data leakage prevention method and device, electronic equipment and storage medium | |
CN110472026B (en) | Text information processing method and system, readable storage medium and terminal equipment | |
CN111240927B (en) | Method, device and storage medium for detecting time consumption of method in program | |
CN112698890A (en) | Method, device and equipment for collecting function time consumption and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |