CN106201844B - A kind of log collecting method and device - Google Patents

A kind of log collecting method and device Download PDF

Info

Publication number
CN106201844B
CN106201844B CN201610498825.XA CN201610498825A CN106201844B CN 106201844 B CN106201844 B CN 106201844B CN 201610498825 A CN201610498825 A CN 201610498825A CN 106201844 B CN106201844 B CN 106201844B
Authority
CN
China
Prior art keywords
log
output level
terminal
collected
default
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.)
Active
Application number
CN201610498825.XA
Other languages
Chinese (zh)
Other versions
CN106201844A (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.)
Beijing Rubu Technology Co.,Ltd.
Original Assignee
Beijing Intelligent Housekeeper 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 Beijing Intelligent Housekeeper Technology Co Ltd filed Critical Beijing Intelligent Housekeeper Technology Co Ltd
Priority to CN201610498825.XA priority Critical patent/CN106201844B/en
Publication of CN106201844A publication Critical patent/CN106201844A/en
Application granted granted Critical
Publication of CN106201844B publication Critical patent/CN106201844B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3466Performance evaluation by tracing or monitoring
    • G06F11/3495Performance evaluation by tracing or monitoring for systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3013Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system is an embedded system, i.e. a combination of hardware and software dedicated to perform a certain function in mobile devices, printers, automotive or aircraft systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computing Systems (AREA)
  • Quality & Reliability (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Computer Hardware Design (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the invention discloses a kind of log collecting method and devices, which comprises judges whether to be collected the correspondence log of terminal applies service;If desired it is collected, it is determined that the target application service being collected respectively corresponds the output level of log collection;It is sent to terminal and collects the corresponding log collection instruction of default output level;The correspondence log of the default output level for the target application service that the terminal is sent is received respectively.Described device includes log collection determining module, output level determining module, instruction sending module and log receiving module.The embodiment of the present invention determines whether to carry out log collection, can be realized the active collection of server, avoid log collection and trigger single problem by server judgement;Different logs is collected by output level, can satisfy the requirement that user collects on demand, while avoiding the infull problem of log collection.

Description

A kind of log collecting method and device
Technical field
The present embodiments relate to Internet technical fields, and in particular to a kind of log collecting method and device.
Background technique
As the function of intelligent robot constantly improve, intelligence degree is continuously improved, more and more intelligence machines People initially enters average family, for example, sweeping robot, special robot etc., greatly facilitate people's lives.However, In order to understand the operating status of intelligent robot, failure and problem present in operational process are found in time, needs to collect intelligence Log information in robot operational process, whether the function that intelligent robot is analyzed in help is correctly completed and various parameters The case where index.
Without normal direction mobile phone, there is plate etc. current intelligent robot the intelligent terminal of display screen equally to facilitate touch, Or as wearable type smart machine, user can directly trigger the collection of log.Intelligent robot touching on the market at present Hair logic is single, and log collection is not complete, unstable result, so as to cause can not effectively be diagnosed by log to function. Meanwhile program crashings can only be passively waited, this section of exception information is just submitted, and system all can be automatically clear after program runs quickly and bursts Reason, start-up operation, the probability that program can complete log collection work are very low.
During realizing the embodiment of the present invention, inventor has found the log collecting method of existing intelligent robot only Log collection is triggered after program runs quickly and bursts, causes log collection incomplete, while can not active collection log on demand.
Summary of the invention
Since the log collecting method of existing intelligent robot only triggers log collection after program runs quickly and bursts, lead to log Collect it is incomplete, while can not on demand active collection log the problem of, the present invention proposes a kind of log collecting method and device.
In a first aspect, the embodiment of the present invention proposes a kind of log collecting method, comprising:
Judge whether to be collected the correspondence log of terminal applies service;
If desired it is collected, it is determined that the target application service being collected respectively corresponds the output stage of log collection Not;
It is sent to terminal and collects the corresponding log collection instruction of default output level;
The correspondence log of the default output level for the target application service that the terminal is sent is received respectively.
Preferably, described to judge whether to be collected the correspondence log of terminal applies service, further comprise:
The server judges whether according to current time, current location, current network conditions and server memory situation The correspondence log for the application service that terminal is installed is collected.
Preferably, the target application service that the determination is collected respectively corresponds the output level of log collection, into one Step includes:
According to stl status and fault restoration state, determine that target application services the output stage of corresponding log collection Not.
Preferably, the default output level for receiving the target application service that the terminal is sent respectively Corresponding log further comprises:
Fragment receives the correspondence log of the default output level for the target application service that the terminal is sent.
Preferably, the method also includes:
According to default file address, the corresponding log of the default output level is stored into the default file.
Preferably, according to default file address, the method also includes:
The log stored in the default file is analyzed, analysis result is generated and is shown.
As shown from the above technical solution, log collecting method provided in an embodiment of the present invention judges that determination is by server No carry out log collection, can be realized the active collection of server, avoids log collection and triggers single problem;Pass through output Rank collects different logs, can satisfy the requirement that user collects on demand, while avoiding the infull problem of log collection.
Second aspect, the embodiment of the present invention also propose a kind of log collection device, comprising:
Log collection determining module, for judging whether that the correspondence log to terminal applies service is collected;
Output level determining module, for being if desired collected, it is determined that the target application service difference being collected The output level of corresponding log collection;
Instruction sending module collects the corresponding log collection instruction of default output level for sending to terminal;
Log receiving module, for receiving the default output for the target application service that the terminal is sent respectively The correspondence log of rank.
Preferably, the log collection determining module is further used for according to current time, current location, current network feelings Condition and server memory situation judge whether that the correspondence log for the application service installed to terminal is collected.
Preferably, the output level determining module is further used for being determined according to stl status and fault restoration state Target application services the output level of corresponding log collection.
Preferably, the log receiving module is further used for the target application clothes that fragment receives the terminal transmission The correspondence log of the default output level of business.
Preferably, described device further include:
Memory module stores the corresponding log of the default output level to described for according to default file address In default file.
Preferably, described device further include:
Log analysis module, for analyzing the log stored in the default file, generating analysis result and showing Show.
As shown from the above technical solution, log collection device provided in an embodiment of the present invention judges that determination is by server No carry out log collection, can be realized the active collection of server, avoids log collection and triggers single problem;Pass through output Rank collects different logs, can satisfy the requirement that user collects on demand, while avoiding the infull problem of log collection.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with Other attached drawings are obtained according to these figures.
Fig. 1 is a kind of flow diagram for log collecting method that one embodiment of the invention provides;
Fig. 2 be another embodiment of the present invention provides a kind of log collecting method flow diagram;
Fig. 3 be another embodiment of the present invention provides a kind of log collecting method flow diagram;
Fig. 4 is a kind of structural schematic diagram for log collection device that one embodiment of the invention provides.
Specific embodiment
With reference to the accompanying drawing, the specific embodiment of invention is further described.Following embodiment is only used for more clear Illustrate to Chu technical solution of the present invention, and not intended to limit the protection scope of the present invention.
Fig. 1 shows a kind of flow diagram of log collecting method of one embodiment of the invention offer, comprising:
S101, judge whether to be collected the correspondence log of terminal applies service;
Wherein, server actively can carry out log collection to the correspondence log of terminal applies service according to decision rule;Institute Stating decision rule can be with are as follows: and according to the routine work timetable of intelligent robot, its free time is selected to carry out log collection, with The routine work efficiency of intelligent robot is not influenced;Alternatively, the network condition current according to server, when network speed is very fast Carry out log collection;Alternatively, the memory situation current according to server carries out log collection when free memory is greater than threshold value.
Alternatively, server can also determine whether the day to each application service of terminal according to the monitoring file that terminal is sent Will is collected.Specifically, in terminal side, including the monitoring service being monitored to each application service state;The prison The state of each application service of service acquisition is controlled, and monitoring file, the monitoring are uploaded to server according to prefixed time interval It include the operating status of each application service in file.Specifically, in terminal side, including multiple application services, each application The all corresponding one or more journal files of service.
It, can be to log collection by judging to determine whether that the correspondence log to terminal applies service carries out log collection Switch carries out dynamic control.The output and closing of log can be flexibly controlled in this way, so that in the consumption of no extra performance Meanwhile complete daily record data can be collected, it is analyzed for subsequent;It actively initiates to collect instruction by server-side simultaneously, Intellectual analysis judgement is collected, and breaks the mode that traditional passive collapse is collected, so that collection mode is flexible and changeable, while to intelligent machine The fault diagnosis of device people is more comprehensively.
S102, it is if desired collected, it is determined that the target application service being collected respectively corresponds the defeated of log collection Rank out;
Specifically, the output level of the corresponding log collection of each application service is judged and determined according to preset rules.
For example, the preset rules can be the severity of failure, such as minor failure, moderate failure and severe Failure;Alternatively, the repair time of failure, such as 1 minute, 10 minutes, 30 minutes, 3 hours and 2 days;Alternatively, can be according to user's Specific requirement is preset.
Wherein, the output level is that the corresponding different outputs of each journal file require, and illustrates corresponding application service The abnormal rank generated when operation.
For example, output level can be respectively set from low to high are as follows: i (infor, notice), (verbose is shown v Show details), d (debug, recoverable), w (warn, warning) and e (error, failure).Wherein, i indicates that only notice is used The log of mistake occurs for family, and abnormal rank is minimum, and v indicates the details log that mistake is sent to user, and d indicates to inform user For recoverable error log, w indicates the error log that warning user should be noted, e indicates to send fault log to user, abnormal Rank highest.
Alternatively, the output level can be indicated with 1 grade -5 grades, output level is the log of 1 grade of expression critical function module With the log of the functional module of failure, the log that need to be uploaded in real time;Output level is the day of 2 grades of expression secondary function modules Will is uploaded according to the instruction of server;Output level is the log of 3 grades of expression general function modules, according to server Instruction is uploaded.When the output level of journal file M is 2 grades, and the corresponding functional module of journal file M is without failure, Then when server is sent to intelligent robot uploads 2 level logs, journal file M just is uploaded to server.
Alternatively, the output level can be defined according to the specific requirement of user.
Specifically, it at intelligent robot end, needs to carry out following steps:
A1, the monitoring service object that terminal is installed in the creation of intelligent robot end, each application service take in each application At the main-inlet of business, according to the example that monitoring service object gets monitoring service object respectively, and then judge whether to answer this Log collection is carried out with service;
A2, object initialization, each application service are respectively called initially after getting monitoring service object example respectively Change method is initialized;
Wherein, each application service has received monitoring service object's example respectively in step A2, according to detection service pair Allow to collect switch LOG_ENABLED as defined in example and debugflag's DEBUG attribute, the log for controlling self record are The no console that should be output to terminal.It is described allow collect switch and the debugflag be boolean type data, it is described Allowing to collect switch LOG_ENABLED indicates whether intelligent robot end allows the switch of server collector journal, default situations Under be in off state, to prevent the illegal collection of rogue program;It is described when server judgement, which determines, needs to carry out log collection Allow to collect switch to be in an open state change;The debugflag is that debugging access is more convenient for convenience in debugging process And the label being arranged.Detection service object instance also has registered a customized radio receiver, the radio receiver simultaneously It is responsible for response command, control log switch, and opens the service of collector journal information, for log collection and upload.
A3, log output, monitoring service object's example after each application service initialization calls output level method, past The log information of console output different stage;Wherein, output level method can be customized according to specific requirement by user.
Wherein, step A3 increases new function package, enhances the scheme of native system, when making its use more just Benefit, but without change original Google Code Design style, allow routine call when it is accessible.And the definition in step A3 There are the log rank of an operation, respectively minimal level minLevel and maximum level maxLevel, it is defeated there are one forcing Parameter out, can limitation in break through step A2.Specifically, when in step A3 setting force output when, then no matter the limit of step A2 How is condition processed, is exported according to minimal level in step A3 and maximum level.For example, when pressure exports minimum level Not Wei 2, maximum level be 4 when, then by output level be 2,3,4 log be uploaded to server.
For example,
B1, application service get the monitoring at main-inlet, through LogCat.getInstance (String tag) The example of service object, log collection must necessarily be placed in inlet, and optimal implementation is placed on customized Application In, the instantiation of monitoring service object operation forward as far as possible.Each LogCat has specified tag to be convenient for when instantiating Distinguish filtering log;
B2, it gets and calls init (Context context) method to the object after monitoring service object example Example is initialized.Initialization of this step be in order to do default configuration to the LogCat object of creation, it is internal there are also control and Countercharge making mechanism, such encapsulation allow the mechanism calling of internal complexity to get up to become simply succinct.
B3, logCat.i (String className, String msg) and logCat.i (String are called ClassName, String msg, boolean isOut, String fileName) etc., corresponding corresponding log rank meets The log level rule that Android itself is defined, isOut parameter can break through whole log switching mechanism, and fileName is specified to be protected The local file for the log deposited, it is flexible and changeable.
By carrying out rank control to log collection, it is able to solve and analyzes difficulty caused by huge log;By specified The range of rank is uploaded, and can only be analyzed the log that user is concerned about, be reduced analysis time, quick positioning failure and problem.
S103, it is sent to terminal and collects the corresponding log collection instruction of default output level;
Wherein, the default output level can be preset acording to the requirement of user.
Specifically, server can open the service of collection by reserved backstage port, active control;Open the service of collection Afterwards, server sends the collection instruction for collecting the default corresponding log of output level to terminal.
Wherein, the default output level collected in instruction including log.
For example, server sends to terminal and collects log of the output level less than 3, then terminal is needed output level Log for 1 and 2 is uploaded to server.Wherein, the terminal can be intelligent robot.
S104, receive respectively the target application service that the terminal is sent the default output level correspondence day Will.
Specifically, after server sends the collection instruction for the correspondence log for collecting the default output level to terminal, Terminal side, specific step include:
It is first turned on to allow to collect and switch;
Then according to the output level for collecting the log in instruction, the corresponding log of the output level is searched;
The corresponding log packing of the output level is finally uploaded to the server.
In server-side, after terminal uploads the log of packing, the corresponding log of the default output level is received.
The present embodiment determines whether progress log collection by server judgement, can be realized the active collection of server, It avoids log collection and triggers single problem;Different logs is collected by output level, be can satisfy user and is collected on demand Requirement, while avoiding the infull problem of log collection.
Further, on the basis of above method embodiment, S101 further comprises:
The server judges whether according to current time, current location, current network conditions and server memory situation The correspondence log for the application service that terminal is installed is collected.
Specifically, Chief Web Officer link keep-alive techniques can be used, heartbeat sends detection technique and integrated system situation analysis Decision, it is determined whether the log for the application service that terminal is installed is collected.Wherein, the Chief Web Officer links keep-alive techniques Indicate the connection for maintaining network permanent and stable;The heartbeat sends detection technique and indicates to send out after being spaced preset time to server Notice is sent, informing is currently running;The integrated system situation analysis decision indicates that summation considers that Multiple factors are analyzed, such as According to current time, current location, current network conditions, current interaction scenario, server memory situation, total system operation The various factors such as situation, which combine, to be judged whether to need to start smartphone log.
For example, server selects a kind of triggering mode of collection, such as: calling startSave method, server-side is sent Diagnostic function is opened in instruction, and in another independent process, which is responsible for log collection and beats for the specific service for collecting order Biography is wrapped, other business are not involved in, guarantees safety.
Log collection is judged whether to by current design parameter, log receipts can be carried out in conjunction with current concrete condition Collection not influence the routine work of intelligent robot, and improves the efficiency of log collection.
Further, on the basis of above method embodiment, S102 further comprises:
According to stl status and fault restoration state, determine that target application services the output stage of corresponding log collection Not.
Specifically, the stl status refers to the current mode of operation of log, for example whether updating;The failure is repaired Multiple state refers to the state after the application program of log recording breaks down, for example whether having repaired.
When log is in more new state, rank can be output it and be set as lower rank, to prevent log renewal process The infull problem of data caused by middle upload log.
It is repaired after the application program of log recording breaks down, then it can set the log to secondary high-level, with Upload server as early as possible;It is not repaired after the application program of log recording breaks down, then can set the log to highest Not, with timely upload server.
Further, on the basis of above method embodiment, S104 further comprises:
Fragment receives the correspondence log of the default output level for the target application service that the terminal is sent.
Using log allocation methods, the success rate of log upload can be improved, reduce bandwidth consumption, while reducing network biography Defeated pressure.
Specifically, fragment uploads again after intelligent robot is compressible when log uploads.
Further, on the basis of above method embodiment, as shown in Figure 2, which comprises
S201, judge whether to be collected the correspondence log of terminal applies service;
S202, it is if desired collected, it is determined that the target application service being collected respectively corresponds the defeated of log collection Rank out;
S203, it is sent to terminal and collects the corresponding log collection instruction of default output level;
S204, receive respectively the target application service that the terminal is sent the default output level correspondence day Will.
S205, according to default file address, the corresponding log of the default output level is stored to the default file In.
Wherein, the S101-S104 in S201-S204 embodiment corresponding with Fig. 1 is corresponding.
The default file address can be preset according to the specific requirement of user.
Specifically, by setting thread pool and file security lock control in S205, guarantee that file is correct, safe and efficient It is written in default file.
Further, on the basis of above method embodiment, as shown in Figure 3, which comprises
S301, judge whether to be collected the correspondence log of terminal applies service;
S402, it is if desired collected, it is determined that the target application service being collected respectively corresponds the defeated of log collection Rank out;
S303, it is sent to terminal and collects the corresponding log collection instruction of default output level;
S304, receive respectively the target application service that the terminal is sent the default output level correspondence day Will.
S305, according to default file address, the corresponding log of the default output level is stored to the default file In.
S306, the log stored in the default file is analyzed, generate analysis result and shown.
Wherein, the S201-S205 in S301-S205 embodiment corresponding with Fig. 2 is corresponding.
Specifically, in S306 pass through server analysis, different error codes can be generated, and make mark, for Family is in the clearly set of the preview data from the background.
For example, problem identification may include: and not solve, unimportant, solve, and can not currently solve, Retarded Solution Certainly, special treatment.
By analyzing log, complete and intuitive functional diagnosis can be generated as a result, can be by for developer It need to carry out the management of response application service.
The present embodiment carries out segregation of duties to whole structural framing, using dynamical fashion control log switch, and with solely Vertical process Service logcat order collector journal information analysis diagnostic function.I.e. by the work of each system service of terminal monitoring State is reported to server when having detected abnormality, then server actively starts to count terminal exception accordingly The corresponding abnormal log of module, and abnormal log is uniformly forwarded to log server generation error code, function is carried out for developer It can diagnosis.
The Logcat command set of google android system can be used in the present embodiment, by combining java thread pond, more Threading, multi-process file security Writing Technology, file fragmentation and synthetic technology make calling program log collection and upload shape At a perfect closed loop, there is information to collect, and complete, program is stable, performance consumption is low and the advantage of smartphone, and And also support response remote collection instruction, with high security, scalability is strong, the simple advantage of operability and technique extension, with And the progressive meaning constantly brought forth new ideas.
Fig. 4 shows a kind of structural schematic diagram of log collection device of one embodiment of the invention offer, described device packet It includes: log collection determining module 41, output level determining module 42, instruction sending module 43 and log receiving module 44;Wherein,
The log collection determining module 41 is for judging whether to be collected the correspondence log of terminal applies service;
If desired the output level determining module 42 is for being collected, it is determined that the target application service being collected Respectively correspond the output level of log collection;
Described instruction sending module 43, which is used to send to terminal, collects the corresponding log collection instruction of default output level;
The log receiving module 44 is used to receive the described pre- of the target application service that the terminal is sent respectively If the correspondence log of output level.
Specifically, the log collection determining module 41 judges whether to receive the correspondence log of terminal applies service Collection;If desired the output level determining module 42 is collected, it is determined that the target application service being collected respectively corresponds The output level of log collection;Described instruction sending module 43 is sent to terminal collects the default corresponding log collection of output level Instruction;The log receiving module 44 receives the default output stage for the target application service that the terminal is sent respectively Other corresponding log.
The present embodiment determines whether progress log collection by server judgement, can be realized the active collection of server, It avoids log collection and triggers single problem;Different logs is collected by output level, be can satisfy user and is collected on demand Requirement, while avoiding the infull problem of log collection.
Further, on the basis of above-mentioned apparatus embodiment, the log collection determining module 41 is further used for root According to current time, current location, current network conditions and server memory situation, judge whether the application clothes installed to terminal The correspondence log of business is collected.
Further, on the basis of above-mentioned apparatus embodiment, the output level determining module 42 is further used for root According to stl status and fault restoration state, determine that target application services the output level of corresponding log collection.
Further, on the basis of above-mentioned apparatus embodiment, the log receiving module 44 is further used for fragment and connects Receive the correspondence log of the default output level for the target application service that the terminal is sent.
Further, on the basis of above-mentioned apparatus embodiment, described device further include:
Memory module 45, for according to default file address, the corresponding log of the output level to be stored to described pre- If in file.
Further, on the basis of above-mentioned apparatus embodiment, described device further include:
Log analysis module 46 generates analysis result simultaneously for analyzing the log stored in the default file Display.
Log collection device described in the present embodiment can be used for executing above method embodiment, principle and technical effect Similar, details are not described herein again.
The apparatus embodiments described above are merely exemplary, wherein described, unit can as illustrated by the separation member It is physically separated with being or may not be, component shown as a unit may or may not be physics list Member, it can it is in one place, or may be distributed over multiple network units.It can be selected according to the actual needs In some or all of the modules achieve the purpose of the solution of this embodiment.Those of ordinary skill in the art are not paying creativeness Labour in the case where, it can understand and implement.
Through the above description of the embodiments, those skilled in the art can be understood that each embodiment can It realizes by means of software and necessary general hardware platform, naturally it is also possible to pass through hardware.Based on this understanding, on Stating technical solution, substantially the part that contributes to existing technology can be embodied in the form of software products in other words, should Computer software product may be stored in a computer readable storage medium, such as ROM/RAM, magnetic disk, CD, including several fingers It enables and using so that a computer equipment (can be personal computer, server or the network equipment etc.) executes each implementation Method described in certain parts of example or embodiment.
It is noted that the above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although reference Invention is explained in detail for previous embodiment, those skilled in the art should understand that: it still can be right Technical solution documented by foregoing embodiments is modified or equivalent replacement of some of the technical features;And this It modifies or replaces, the spirit and model of technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution It encloses.

Claims (10)

1. a kind of log collecting method characterized by comprising
Judge whether to be collected the correspondence log of terminal applies service;
If desired it is collected, it is determined that the target application service being collected respectively corresponds the output level of log collection;
It is sent to terminal and collects the corresponding log collection instruction of default output level;
The correspondence log of the default output level for the target application service that the terminal is sent is received respectively;
Wherein, described to judge whether to be collected the correspondence log of terminal applies service, further comprise:
Server judges whether according to current time, current location, current network conditions and server memory situation to terminal institute The correspondence log of the application service of installation is collected.
2. the method according to claim 1, wherein the target application service that the determination is collected is right respectively The output level for answering log collection further comprises:
According to stl status and fault restoration state, determine that target application services the output level of corresponding log collection.
3. the method according to claim 1, wherein the target for receiving the terminal transmission respectively is answered With the correspondence log of the default output level of service, further comprise:
Fragment receives the correspondence log of the default output level for the target application service that the terminal is sent.
4. method according to claim 1-3, which is characterized in that the method also includes:
According to default file address, the corresponding log of the default output level is stored into the default file.
5. according to the method described in claim 4, it is characterized in that, the method also includes:
The log stored in the default file is analyzed, analysis result is generated and is shown.
6. a kind of log collection device characterized by comprising
Log collection determining module, for judging whether that the correspondence log to terminal applies service is collected;
Output level determining module, for being if desired collected, it is determined that the target application service being collected respectively corresponds The output level of log collection;
Instruction sending module collects the corresponding log collection instruction of default output level for sending to terminal;
Log receiving module, for receiving the default output level for the target application service that the terminal is sent respectively Correspondence log;
Wherein, the log collection determining module is further used for according to current time, current location, current network conditions kimonos Business device memory situation, judges whether that the correspondence log for the application service installed to terminal is collected.
7. device according to claim 6, which is characterized in that the output level determining module was further used for according to day Will state and fault restoration state determine that target application services the output level of corresponding log collection.
8. device according to claim 6, which is characterized in that the log receiving module is further used for fragment and receives institute State the correspondence log of the default output level of the target application service of terminal transmission.
9. according to the described in any item devices of claim 6-8, which is characterized in that described device further include:
Memory module stores the corresponding log of the default output level to described default for according to default file address In file.
10. device according to claim 9, which is characterized in that described device further include:
Log analysis module, for analyzing the log stored in the default file, generating analysis result and showing.
CN201610498825.XA 2016-06-29 2016-06-29 A kind of log collecting method and device Active CN106201844B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610498825.XA CN106201844B (en) 2016-06-29 2016-06-29 A kind of log collecting method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610498825.XA CN106201844B (en) 2016-06-29 2016-06-29 A kind of log collecting method and device

Publications (2)

Publication Number Publication Date
CN106201844A CN106201844A (en) 2016-12-07
CN106201844B true CN106201844B (en) 2019-01-01

Family

ID=57463498

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610498825.XA Active CN106201844B (en) 2016-06-29 2016-06-29 A kind of log collecting method and device

Country Status (1)

Country Link
CN (1) CN106201844B (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107609117B (en) * 2017-09-13 2020-09-01 Oppo广东移动通信有限公司 Log information reporting method and device, storage medium, ADSP and terminal
CN107562602B (en) * 2017-09-13 2021-11-16 Oppo广东移动通信有限公司 Log information reporting method and device, storage medium, ADSP and terminal
CN107590241B (en) * 2017-09-13 2021-07-09 Oppo广东移动通信有限公司 Log information reporting method and device, storage medium, ADSP and terminal
CN108011745B (en) * 2017-09-30 2021-05-14 北京车和家信息技术有限公司 Data transmission method and device
CN109218407B (en) * 2018-08-14 2022-10-25 平安普惠企业管理有限公司 Code management and control method based on log monitoring technology and terminal equipment
CN111159127A (en) * 2018-11-07 2020-05-15 中移(苏州)软件技术有限公司 Log analysis method and device based on Apriori algorithm
CN109962978A (en) * 2019-02-28 2019-07-02 深圳市盛弘电气股份有限公司 Charging pile log deriving method, charging pile and control equipment
CN110413480A (en) * 2019-04-30 2019-11-05 北京云迹科技有限公司 Processing method and processing device for robot operating status
CN110928753A (en) * 2019-11-19 2020-03-27 深圳前海环融联易信息科技服务有限公司 Method and device for controlling log output of browser console, computer equipment and computer readable storage medium
CN111209023B (en) * 2020-01-08 2023-06-23 百度在线网络技术(北京)有限公司 Skill service updating method and device, electronic equipment and readable storage medium
CN112306834A (en) * 2020-10-29 2021-02-02 武汉迈威通信股份有限公司 Embedded log management system and method
CN115223269A (en) * 2021-09-06 2022-10-21 广州汽车集团股份有限公司 Automobile log uploading method and device, computer equipment and automobile

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102790686A (en) * 2011-05-17 2012-11-21 浙江核新同花顺网络信息股份有限公司 Log data collecting method and system and log collecting server
WO2013161522A1 (en) * 2012-04-24 2013-10-31 日本電気株式会社 Log collection server, log collection system, log collection method
CN103942134A (en) * 2014-04-04 2014-07-23 福建星网视易信息系统有限公司 Method and system for viewing embedded device log
CN104253704A (en) * 2013-06-28 2014-12-31 腾讯科技(深圳)有限公司 Terminal log reporting method, device and system
CN104601374A (en) * 2015-01-05 2015-05-06 北京数码大方科技股份有限公司 Network fault processing method and device for numerical control machine tool

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102790686A (en) * 2011-05-17 2012-11-21 浙江核新同花顺网络信息股份有限公司 Log data collecting method and system and log collecting server
WO2013161522A1 (en) * 2012-04-24 2013-10-31 日本電気株式会社 Log collection server, log collection system, log collection method
CN104253704A (en) * 2013-06-28 2014-12-31 腾讯科技(深圳)有限公司 Terminal log reporting method, device and system
CN103942134A (en) * 2014-04-04 2014-07-23 福建星网视易信息系统有限公司 Method and system for viewing embedded device log
CN104601374A (en) * 2015-01-05 2015-05-06 北京数码大方科技股份有限公司 Network fault processing method and device for numerical control machine tool

Also Published As

Publication number Publication date
CN106201844A (en) 2016-12-07

Similar Documents

Publication Publication Date Title
CN106201844B (en) A kind of log collecting method and device
CN110717665B (en) System and method for fault identification and trend analysis based on scheduling control system
CN107179957B (en) Physical machine fault classification processing method and device and virtual machine recovery method and system
CN103685459B (en) Distributed system, server computer, distributed management server and failure prevention method
US10545807B2 (en) Method and system for acquiring parameter sets at a preset time interval and matching parameters to obtain a fault scenario type
CN108173911B (en) Micro-service fault detection processing method and device
CN106789306B (en) Method and system for detecting, collecting and recovering software fault of communication equipment
CN103812675A (en) Method and system for realizing allopatric disaster recovery switching of service delivery platform
CN107147540A (en) Fault handling method and troubleshooting cluster in highly available system
US11706080B2 (en) Providing dynamic serviceability for software-defined data centers
CN110891283A (en) Small base station monitoring device and method based on edge calculation model
CN109714202A (en) A kind of client off-line reason method of discrimination and concentrating type safety management system
CN104065526B (en) A kind of method and apparatus of server failure alarm
CN102833120B (en) The abnormal method and system of NM server are processed in a kind of rapid automatized test
CN105978721A (en) Method, device and system for monitoring operation state of services in clustering system
US11934855B2 (en) System and method to autonomously manage hybrid information technology (IT) infrastructure
CN106330599A (en) Multi-thread collection system and method for network flow of Android application program
CN108762886B (en) Fault detection recovery method and system for virtual machine
CN111930222A (en) Control method and device and electronic equipment
CN115664939A (en) Comprehensive operation and maintenance method and device based on automation technology and storage medium
CN107528705B (en) Fault processing method and device
CN103927244B (en) A kind of method of the plug-in unit scheduling process monitoring realized based on dynamic proxy
CN109614297A (en) Data guard method, device, equipment, system and computer readable storage medium
KR101433045B1 (en) System and method for detecting error beforehand
CN102231124B (en) A kind of guard method of tasks of embedded system

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
CP01 Change in the name or title of a patent holder

Address after: Room 508-598, Xitian Gezhuang Town Government Office Building, No. 8 Xitong Road, Miyun County Economic Development Zone, Beijing 101500

Patentee after: Beijing Rubo Technology Co., Ltd.

Address before: Room 508-598, Xitian Gezhuang Town Government Office Building, No. 8 Xitong Road, Miyun County Economic Development Zone, Beijing 101500

Patentee before: BEIJING INTELLIGENT HOUSEKEEPER TECHNOLOGY CO., LTD.

CP01 Change in the name or title of a patent holder
TR01 Transfer of patent right

Effective date of registration: 20210819

Address after: 301-112, floor 3, building 2, No. 18, YANGFANGDIAN Road, Haidian District, Beijing 100038

Patentee after: Beijing Rubu Technology Co.,Ltd.

Address before: Room 508-598, Xitian Gezhuang Town Government Office Building, No. 8 Xitong Road, Miyun County Economic Development Zone, Beijing 101500

Patentee before: BEIJING ROOBO TECHNOLOGY Co.,Ltd.

TR01 Transfer of patent right