CN108880877A - A kind of acquisition methods and device of log - Google Patents
A kind of acquisition methods and device of log Download PDFInfo
- Publication number
- CN108880877A CN108880877A CN201810582360.5A CN201810582360A CN108880877A CN 108880877 A CN108880877 A CN 108880877A CN 201810582360 A CN201810582360 A CN 201810582360A CN 108880877 A CN108880877 A CN 108880877A
- Authority
- CN
- China
- Prior art keywords
- log
- instruction
- preset position
- target
- target log
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 52
- 238000004891 communication Methods 0.000 claims abstract description 29
- 230000008859 change Effects 0.000 claims description 3
- 238000012546 transfer Methods 0.000 claims description 3
- 238000009434 installation Methods 0.000 abstract description 3
- 238000011017 operating method Methods 0.000 abstract 1
- 230000006870 function Effects 0.000 description 19
- 230000008569 process Effects 0.000 description 11
- 244000035744 Hura crepitans Species 0.000 description 5
- 230000009471 action Effects 0.000 description 3
- 230000001960 triggered effect Effects 0.000 description 3
- 238000012545 processing Methods 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 1
- 230000000903 blocking effect Effects 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/06—Management of faults, events, alarms or notifications
- H04L41/069—Management of faults, events, alarms or notifications using logs of notifications; Post-processing of notifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/02—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Debugging And Monitoring (AREA)
Abstract
In technical solution of the present invention, the acquisition methods and device of a kind of log are disclosed, are applied to first terminal equipment, the acquisition methods receive the log collection instruction that user sends;It is instructed according to the log collection, the target journaling of the log collection instruction is captured, so that the target journaling to be saved in the predeterminated position of the first terminal;Wherein, the predeterminated position is different from the save location of target journaling;Receive the log output order that user is sent by way of shortcut key;Communication tool specified in the log output order is called, the target journaling in the predeterminated position is sent to designated user using the communication tool.Since the target journaling of capture is stored in predeterminated position in the embodiment of the present invention, user can send designated user for the target journaling by shortcut key, therefore, without connect computer, installation driving and etc., operating procedure is simplified, it is quick to export, improve execution efficiency.
Description
Technical Field
The invention relates to the technical field of internet, in particular to a method and a device for acquiring logs.
Background
A log or debug log refers to a record of software that has completed some processing for use by a software developer as a reference to improve or check the operation of a program. For example, the application program may have problems, and the related problems may be located by logs, so that logs of terminal devices such as mobile phones, set-top boxes and smart televisions need to be obtained as a basis.
In the prior art, a method for acquiring logs needs to connect a computer to a terminal device through a serial port line/data line, then install a driver, a debugging tool, third-party assistant software and the like, manually set a central USB debugging function, and finally input a related log acquiring command through a command line input interface provided by the debugging tool to acquire and store the logs.
It can be seen that, in the prior art, the acquisition of the log can be realized only by installing a driver, connecting hardware, inputting a command with a professional technology, and the like, and the operation steps are complicated, the operation process is complex, and the execution efficiency is not high.
Disclosure of Invention
In view of this, the embodiment of the present invention discloses a method and an apparatus for acquiring a log, which are used to acquire a log of a terminal device, and have the advantages of few operation steps, simple operation process and high execution efficiency.
The embodiment of the invention discloses a log obtaining method, which is applied to first terminal equipment and comprises the following steps:
receiving a log acquisition instruction;
capturing a target log specified by the log acquisition instruction according to the log acquisition instruction so as to store the target log to a preset position of the first terminal; the preset position is different from the storage position of the target log, and the file in the preset position can be read and deleted;
receiving a log output instruction sent by a user in a shortcut key mode;
and calling a communication tool appointed in the log output instruction, and sending the target log in the preset position to an appointed user by using the communication tool.
Preferably, the log collection instruction is an instruction for changing a system log storage path;
the capturing, according to the log collection instruction, the target log specified by the log collection instruction includes:
analyzing the instruction for changing the system log storage path to obtain the address information of the preset position of the first terminal;
and changing the original output position of the system log into the preset position, and transferring the system log in the original output position to the preset position for storage.
Preferably, the log collection instruction is a capture specific log instruction;
the capturing, according to the log collection instruction, the target log specified by the log collection instruction includes:
analyzing the instruction for capturing the specific log to obtain parameters including a target log format and an identifier;
and taking the target log format and the identified parameters as input parameters of a preset function, calling the preset function, and outputting the target log at a preset position.
Preferably, the method further comprises the following steps:
pre-establishing a web server network service program, and taking the preset position as a data source address of the network service program;
receiving a target log obtaining instruction sent by second terminal equipment through an FTP (file transfer protocol);
and returning the target log to the second terminal equipment according to the FTP.
Preferably, the method further comprises the following steps:
pre-establishing a web server network service program, and taking the preset position as a data source address of the network service program;
receiving a target log obtaining instruction sent by a third terminal device through an HTTP (hyper text transport protocol);
and returning the webpage containing the content in the target log to the first scattered terminal equipment according to the HTTP.
The embodiment of the invention also discloses a log obtaining device, which is applied to the first terminal equipment, and comprises:
the first receiving module is used for receiving a log acquisition instruction;
the acquisition module is used for capturing a target log specified by the log acquisition instruction according to the log acquisition instruction so as to store the target log to a preset position of the first terminal; the preset position is different from the storage position of the target log, and the file in the preset position can be read and deleted;
the second receiving module is used for receiving a log output instruction sent by a user in a shortcut key mode;
and the output module is used for calling the communication tool appointed in the log output instruction and sending the target log in the preset position to an appointed user by using the communication tool.
Preferably, the log collection instruction is an instruction for changing a system log storage path;
the capturing, according to the log collection instruction, the target log specified by the log collection instruction includes:
analyzing the instruction for changing the system log storage path to obtain the address information of the preset position of the first terminal;
and changing the original output position of the system log into the preset position, and transferring the system log in the original output position to the preset position for storage.
Preferably, the log collection instruction is a capture specific log instruction;
the capturing, according to the log collection instruction, the target log specified by the log collection instruction includes:
analyzing the instruction for capturing the specific log to obtain parameters including a target log format and an identifier;
and taking the target log format and the identified parameters as input parameters of a preset function, calling the preset function, and outputting the target log at a preset position.
Preferably, the method further comprises the following steps:
the web server module is used for pre-establishing a web server network service program and taking the preset position as a data source address of the network service program;
the third receiving module is used for receiving a target log obtaining instruction sent by the second terminal device through the FTP protocol;
and the downloading module is used for returning the target log to the second terminal equipment according to the FTP protocol.
Preferably, the method further comprises the following steps:
the web server module is used for pre-establishing a web server network service program and taking the preset position as a data source address of the network service program;
the fourth receiving module is used for receiving a target log obtaining instruction sent by the third terminal equipment through an HTTP (hyper text transport protocol);
and the webpage browsing module is used for returning the webpage containing the content in the target log to the first loose terminal equipment according to the HTTP protocol.
The technical scheme of the invention discloses a log acquisition method and a log acquisition device, which are applied to first terminal equipment, wherein the acquisition method receives a log acquisition instruction sent by a user; capturing a target log specified by the log acquisition instruction according to the log acquisition instruction so as to store the target log to a preset position of the first terminal; the preset position is different from the storage position of the target log, and the file in the preset position can be read and deleted; receiving a log output instruction sent by a user in a shortcut key mode; and calling a communication tool appointed in the log output instruction, and sending the target log in the preset position to an appointed user by using the communication tool. In the embodiment of the invention, the captured target log is stored in the preset position, and the user can send the target log to the designated user through the shortcut key, so that the steps of connecting a computer, installing a driver and the like are not needed, the operation steps are simplified, the output is fast, and the execution efficiency is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a schematic flowchart of a log obtaining method according to an embodiment of the present invention;
FIG. 2 is another schematic flow chart of a log obtaining method according to an embodiment of the present invention;
FIG. 3 is a schematic flowchart of a log obtaining method according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an apparatus for acquiring a log according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, fig. 1 is a schematic flowchart of a log obtaining method disclosed in the present invention.
The invention discloses a log obtaining method which is applied to first terminal equipment.
In the embodiment of the present invention, the first terminal device may be any one of a set top box, a mobile phone, and a smart television, and certainly, the mobile phone may be any one of an android system or an iOS system, and is preferably an android system. Of course, the embodiment of the present invention may be specifically applied to any application program in the first terminal device, for example, implanted into an APP, to implement obtaining of the APP log.
In the embodiment of the invention, the acquisition method comprises the following steps:
s101, receiving a log acquisition instruction;
in the embodiment of the invention, a log acquisition instruction is received firstly. The sending of the log collection instruction may be actively triggered by the user, or may be automatically triggered by the system, and the target log to be collected is specified in the log collection instruction. The target log typically comprises a system log or a log generated by a specified application.
S102, capturing a target log specified by the log acquisition instruction according to the log acquisition instruction so as to store the target log to a preset position of the first terminal; the preset position is different from the storage position of the target log, and the file in the preset position can be read and deleted;
in the embodiment of the invention, the designated target log is captured according to the log collection instruction. So that the target log can be saved to the preset position of the first terminal. The file in the preset position can have read-write permission, and can be read, deleted, moved and the like by a user. It can be understood that if the preset position is set in the server, the preset position can be implemented only by implementing the corresponding program on the server side, and the application focuses on the improvement on the terminal side, so that the preset position is not described in detail on the server side.
In actual use, the preset location may be any location with read-write permission, for example, in a sandbox directory which may be set as an APP in the iOS system, or in a memory. The local disk has the advantages that faults such as dead halt, bug flash back and blocking of the program occur, the log is still stored in the disk, and log archiving can be achieved. So that after a problem occurs, the reason of the fault can be further analyzed according to the log.
In practical use, for example, in a Linux system, the preset location may be in a log directory under the installation directory. Specifically, for example, the log is installed in a preset location of/user/local hunter/log, and 20180604_110901_001.txt log is used as a target log.
For example, in the android system, the preset position may be in an app installation package storage directory in a root directory, for example, under a data/data/package name.
For example, in an iOS system, the preset location may be an APP sandbox directory, such as under/var/mobile/contacts/Data/Application id/Documents/logHunterLog. It can be understood that the sandbox directory is a security mechanism of the iOS system, and all APPs have their own sandbox directory and can only read and write their own sandbox directory.
It is understood that the set-top box is generally a Linux system or an android system, and the specific setting manner can be referred to the above example.
The target log in the preset position can be a txt format file. It is understood that xml format or other format may be used according to actual needs.
S103, receiving a log output instruction sent by a user in a shortcut key mode;
and after the target log is collected, receiving a log output instruction returned by the user in a shortcut key mode. The shortcut key mode can be a combined key mode of a set top box remote controller, and a log output instruction is sent when the upper, lower, left, right and left keys of the remote controller are continuously pressed within a preset interval time, for example, 1 second.
Of course, the key may be triggered by using other key combination modes as shortcut key modes, for example, a plurality of number keys are sequentially pressed at preset intervals. The user only needs to execute the shortcut key to trigger the log output instruction, and the workload is greatly reduced for users needing to know the log condition, such as software developers.
And S104, calling a communication tool appointed in the log output instruction, and sending the target log in the preset position to an appointed user by using the communication tool.
After receiving the log output command, the communication tool specified in the log output command is called. Such as a messenger, QQ, email, etc.
Of course, an interface for user selection may be generated to receive the communication tool selected by the user and the designated user in the communication tool.
In the embodiment of the invention, the communication tool and the designated user are preferably preset, and when the log output instruction is received, the designated user in the communication tool can be automatically used as a receiver. And sending out the target log at the preset position. In actual use, the user only feels that the shortcut key is pressed, and the designated user receives the target log in the preset position. The log can be acquired without depending on a computer, various steps are not needed, the log can be acquired by one key, the operation process is simple, and the execution efficiency is high.
Therefore, the steps of connecting a computer, installing a driver and the like are not needed, the operation steps are simplified, the output is fast, and the execution efficiency is improved.
According to the scheme, the captured target log is stored in the preset position, and the user can send the target log to the designated user through the shortcut key, so that the steps of connecting a computer, installing a driver and the like are not needed, the operation steps are simplified, the output is fast, and the execution efficiency is improved.
It can be understood that, in the technical solution of the present application, the number of the log files is preferably a single log file, and certainly, the number of the log files may also be multiple, if the number of the log files is multiple, the corresponding log file is obtained according to the identifier in the obtaining instruction, an explicit log may be obtained, and a manner of determining one log from multiple logs is not limited.
In this embodiment of the present invention, after step S102, the method may further include:
archiving a target log at a preset position;
when a specific log acquisition instruction is received, acquiring a target log meeting a preset condition from the archived target logs according to the preset condition in the specific log acquisition instruction;
receiving a specific log output instruction sent by a user in a shortcut key mode;
and calling a communication tool appointed in the specific log output instruction, and sending the target log in the preset position to an appointed user by using the communication tool.
The preset condition may be an archive date or an archive date range, or may be a specific identifier of a certain target log.
For example, the embodiment of the present invention is integrated in a certain APP, and if the APP crashes or flashes, the steps S103 to S104 may not be executed, that is, the target log cannot be obtained. If the target log is archived according to the preset mode in the technical scheme of the invention, for example, the target log is named according to the archiving time of the log, at this time, the APP is started again, the preset condition can be input, for example, the archiving time range, the log started last time can be called, the information related to the crash flash quit can be consulted, and further, the analysis can be carried out, and the reason of the fault can be obtained.
Of course, it is understood that the output may also be output in a manner of using a web server network server in the following embodiments, and the specific output manner will be described in detail later.
In the above embodiment, the process of capturing the target log is described, and this process is described in detail below.
Referring to fig. 2, fig. 2 is another schematic flow chart of a log obtaining method according to an embodiment of the present invention.
Referring to fig. 2, embodiments of the present invention include.
S201, receiving a log collection instruction.
The log acquisition instruction is an instruction for changing a system log storage path;
in the embodiment of the invention, the system log can be captured. Wherein the change system log storage path instruction may be to invoke a function to redirect input output streams.
S202, analyzing the instruction for changing the system log storage path to obtain address information of a preset position of the first terminal;
and changing the original output position of the system log into the preset position, and transferring the system log in the original output position to the preset position for storage.
In the embodiment of the invention, the path stored in the original system log is changed to the preset position according to the analyzed instruction for changing the storage path of the system log. And completely moving the original system log to a preset position. In order to facilitate the source file being output as a subsequent log.
S203, receiving a log output instruction sent by a user in a shortcut key mode;
and S204, calling a communication tool appointed in the log output instruction, and sending the target log in the preset position to an appointed user by using the communication tool.
The execution process of steps S203 and S204 is the same as steps S103 and S104 in the foregoing embodiment, and therefore, the description is omitted.
In the embodiment of the invention, the system log can be captured, and the system log is relatively comprehensive, so that a user can execute subsequent operations according to the system log, and an effective reference basis is provided for the user.
Referring to fig. 3, fig. 3 is a schematic flowchart of another method for acquiring a log according to an embodiment of the present invention.
Referring to fig. 3, embodiments of the present invention include.
S301, receiving a log collection instruction.
The log acquisition instruction is a specific log capturing instruction;
s302, analyzing the specific log capturing instruction to obtain parameters including a target log format and an identifier;
and taking the target log format and the identified parameters as input parameters of a preset function, calling the preset function, and outputting the target log at a preset position.
In the embodiment of the invention, a preset function is preset, the preset function is used for collecting a certain specific log, the preset function has input parameters and output parameters, wherein the input parameters can be log formats and identifications, and the output is a preset position. Therefore, after receiving the instruction for capturing the specific log, the parameters in the specific log are analyzed, the format and the identification of the target log are used as input parameters to call the preset function, and the target log is output at a preset position.
Because the system logs are often very large, and therefore the target log may be too large, in the embodiment of the present invention, a specific log capturing instruction sent by a user is received to obtain a specific target log, for example, a log of an application program. The reference significance of the target log is larger, the size of the target log is smaller, and the network transmission load and the terminal processing pressure are reduced.
On the basis of the above embodiment, the embodiment of the present invention also establishes a web server network service program in advance.
In the embodiment of the invention, the method further comprises the following steps:
pre-establishing a web server network service program, and taking the preset position as a data source address of the network service program;
receiving a target log obtaining instruction sent by second terminal equipment through an FTP (file transfer protocol);
and returning the target log to the second terminal equipment according to the FTP.
Or,
receiving a target log obtaining instruction sent by a third terminal device through an HTTP (hyper text transport protocol);
and returning the webpage containing the content in the target log to the third terminal equipment according to the HTTP.
In the embodiment of the invention, a web server network service program is pre-established. The process of establishing the network service program can be that a code for establishing the network service program input by a user is received, and the related components of the network service program are established according to the code, so that the terminal has the function of the network service program. The preset position is a data source address, and the file of the preset position is set as a data source of the database, so that the terminal has the downloading function of FTP and the network browsing function of HTTP. And the log at the preset position can be downloaded by a user in an FTP mode or directly browsed by the user in an HTTP mode. The second terminal device may be the same type as the first terminal device, may be different types, and may also be a device such as a PC. In the embodiment of the invention, after the target log is sent by the shortcut key, a target log obtaining instruction sent by a user through an FTP protocol or an HTTP protocol can be received, and then the target log is obtained by a network downloading and web browsing mode.
Therefore, the functions of network downloading of the log and online webpage previewing are realized. No computer equipment is required.
Compared with the method for positioning the focus frame in the embodiment, the embodiment of the invention also discloses a device for acquiring the log.
Referring to fig. 4, an apparatus for acquiring a log disclosed in an embodiment of the present invention is applied to a first terminal device, and the apparatus includes:
the first receiving module 1 is used for receiving a log acquisition instruction;
the acquisition module 2 is used for capturing a target log specified by the log acquisition instruction according to the log acquisition instruction so as to store the target log to a preset position of the first terminal; the preset position is different from the storage position of the target log, and the file in the preset position can be read and deleted;
the second receiving module 3 is used for receiving a log output instruction sent by a user in a shortcut key mode;
and the output module 4 is used for calling a communication tool appointed in the log output instruction and sending the target log in the preset position to an appointed user by using the communication tool.
Preferably, the log collection instruction is an instruction for changing a system log storage path;
the capturing, according to the log collection instruction, the target log specified by the log collection instruction includes:
analyzing the instruction for changing the system log storage path to obtain the address information of the preset position of the first terminal;
and changing the original output position of the system log into the preset position, and transferring the system log in the original output position to the preset position for storage.
The system also comprises an archiving module used for archiving the target log at the preset position;
the specific log acquisition module is used for acquiring a target log meeting a preset condition in the archived target logs according to the preset condition in the specific log acquisition instruction when the specific log acquisition instruction is received;
the specific log output module is used for receiving a specific log output instruction sent by a user in a shortcut key mode; and calling a communication tool appointed in the specific log output instruction, and sending the target log in the preset position to an appointed user by using the communication tool.
The preset condition may be an archive date or an archive date range, or may be a specific identifier of a certain target log.
Preferably, the log collection instruction is a capture specific log instruction;
the capturing, according to the log collection instruction, the target log specified by the log collection instruction includes:
analyzing the instruction for capturing the specific log to obtain parameters including a target log format and an identifier;
and taking the target log format and the identified parameters as input parameters of a preset function, calling the preset function, and outputting the target log at a preset position.
Preferably, the method further comprises the following steps:
the web server module is used for pre-establishing a web server network service program and taking the preset position as a data source address of the network service program;
the third receiving module is used for receiving a target log obtaining instruction sent by the second terminal device through the FTP protocol;
and the downloading module is used for returning the target log to the second terminal equipment according to the FTP protocol.
Preferably, the method further comprises the following steps:
the web server module is used for pre-establishing a web server network service program and taking the preset position as a data source address of the network service program;
the fourth receiving module is used for receiving a target log obtaining instruction sent by the third terminal equipment through an HTTP (hyper text transport protocol);
and the webpage browsing module is used for returning the webpage containing the content in the target log to the first loose terminal equipment according to the HTTP protocol.
It should be noted that, an obtaining apparatus of a log in the embodiment of the present invention may adopt one obtaining method of a log in the above method embodiment, so as to implement all technical solutions in the above method embodiment, functions of each module of the apparatus may be specifically implemented according to the method in the above method embodiment, and a specific implementation process of the apparatus may refer to relevant descriptions in the above embodiment, which is not described herein again.
The technical scheme of the invention discloses a method and a device for acquiring a log, which are applied to first terminal equipment, wherein a first receiving module of the acquisition device receives a log acquisition instruction sent by a user; the first receiving module captures a target log specified by the log acquisition instruction according to the log acquisition instruction so as to store the target log to a preset position of the first terminal; the preset position is different from the storage position of the target log, and the file in the preset position can be read and deleted; the second receiving module receives a log output instruction sent by a user in a shortcut key mode; and the output module calls a communication tool appointed in the log output instruction and sends the target log in the preset position to an appointed user by using the communication tool. In the embodiment of the invention, the captured target log is stored in the preset position, and the user can send the target log to the designated user through the shortcut key, so that the steps of connecting a computer, installing a driver and the like are not needed, the operation steps are simplified, the output is fast, and the execution efficiency is improved.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims (10)
1. A log obtaining method is applied to a first terminal device, and comprises the following steps:
receiving a log acquisition instruction;
capturing a target log specified by the log acquisition instruction according to the log acquisition instruction so as to store the target log to a preset position of the first terminal; the preset position is different from the storage position of the target log, and the file in the preset position can be read and deleted;
receiving a log output instruction sent by a user in a shortcut key mode;
and calling a communication tool appointed in the log output instruction, and sending the target log in the preset position to an appointed user by using the communication tool.
2. The acquisition method according to claim 1, wherein the log collection instruction is a change system log storage path instruction;
the capturing, according to the log collection instruction, the target log specified by the log collection instruction includes:
analyzing the instruction for changing the system log storage path to obtain the address information of the preset position of the first terminal;
and changing the original output position of the system log into the preset position, and transferring the system log in the original output position to the preset position for storage.
3. The acquisition method according to claim 1, wherein the log collection instruction is a capture specific log instruction;
the capturing, according to the log collection instruction, the target log specified by the log collection instruction includes:
analyzing the instruction for capturing the specific log to obtain parameters including a target log format and an identifier;
and taking the target log format and the identified parameters as input parameters of a preset function, calling the preset function, and outputting the target log at a preset position.
4. The acquisition method according to any one of claims 1 to 3, characterized by further comprising:
pre-establishing a web server network service program, and taking the preset position as a data source address of the network service program;
receiving a target log obtaining instruction sent by second terminal equipment through an FTP (file transfer protocol);
and returning the target log to the second terminal equipment according to the FTP.
5. The acquisition method according to any one of claims 1 to 3, characterized by further comprising:
pre-establishing a web server network service program, and taking the preset position as a data source address of the network service program;
receiving a target log obtaining instruction sent by a third terminal device through an HTTP (hyper text transport protocol);
and returning the webpage containing the content in the target log to the first scattered terminal equipment according to the HTTP.
6. An apparatus for acquiring a log, applied to a first terminal device, includes:
the first receiving module is used for receiving a log acquisition instruction;
the acquisition module is used for capturing a target log specified by the log acquisition instruction according to the log acquisition instruction so as to store the target log to a preset position of the first terminal; the preset position is different from the storage position of the target log, and the file in the preset position can be read and deleted;
the second receiving module is used for receiving a log output instruction sent by a user in a shortcut key mode;
and the output module is used for calling the communication tool appointed in the log output instruction and sending the target log in the preset position to an appointed user by using the communication tool.
7. The apparatus according to claim 6, wherein the log collection instruction is a change system log storage path instruction;
the capturing, according to the log collection instruction, the target log specified by the log collection instruction includes:
analyzing the instruction for changing the system log storage path to obtain the address information of the preset position of the first terminal;
and changing the original output position of the system log into the preset position, and transferring the system log in the original output position to the preset position for storage.
8. The apparatus according to claim 1, wherein the log collection instruction is a capture specific log instruction;
the capturing, according to the log collection instruction, the target log specified by the log collection instruction includes:
analyzing the instruction for capturing the specific log to obtain parameters including a target log format and an identifier;
and taking the target log format and the identified parameters as input parameters of a preset function, calling the preset function, and outputting the target log at a preset position.
9. The acquisition device according to any one of claims 6 to 8, characterized by further comprising:
the web server module is used for pre-establishing a web server network service program and taking the preset position as a data source address of the network service program;
the third receiving module is used for receiving a target log obtaining instruction sent by the second terminal device through the FTP protocol;
and the downloading module is used for returning the target log to the second terminal equipment according to the FTP protocol.
10. The acquisition device according to any one of claims 6 to 8, characterized by further comprising:
the web server module is used for pre-establishing a web server network service program and taking the preset position as a data source address of the network service program;
the fourth receiving module is used for receiving a target log obtaining instruction sent by the third terminal equipment through an HTTP (hyper text transport protocol);
and the webpage browsing module is used for returning the webpage containing the content in the target log to the first loose terminal equipment according to the HTTP protocol.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810582360.5A CN108880877A (en) | 2018-06-07 | 2018-06-07 | A kind of acquisition methods and device of log |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810582360.5A CN108880877A (en) | 2018-06-07 | 2018-06-07 | A kind of acquisition methods and device of log |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108880877A true CN108880877A (en) | 2018-11-23 |
Family
ID=64338535
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810582360.5A Pending CN108880877A (en) | 2018-06-07 | 2018-06-07 | A kind of acquisition methods and device of log |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108880877A (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110519465A (en) * | 2019-07-22 | 2019-11-29 | 平安科技(深圳)有限公司 | Telephony platform log inquiring method, terminal device, storage medium and device |
CN110515814A (en) * | 2019-08-16 | 2019-11-29 | 海南车智易通信息技术有限公司 | Full dose log collecting method, device and the mobile terminal of iOS client |
CN112000405A (en) * | 2020-07-29 | 2020-11-27 | 深圳市智微智能软件开发有限公司 | Method, equipment and storage medium for conveniently acquiring system logs |
CN112203147A (en) * | 2020-09-04 | 2021-01-08 | 深圳创维-Rgb电子有限公司 | Method and device for processing television software log grabbing based on mobile phone and intelligent terminal |
CN112968927A (en) * | 2021-01-28 | 2021-06-15 | 网易(杭州)网络有限公司 | Log extraction method, log extraction device, storage medium and electronic equipment |
CN113592535A (en) * | 2021-06-30 | 2021-11-02 | 北京新氧科技有限公司 | Advertisement recommendation method and device, electronic equipment and storage medium |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101180614A (en) * | 2005-05-25 | 2008-05-14 | 松下电器产业株式会社 | Device remote monitor/recovery system |
CN101291399A (en) * | 2007-09-25 | 2008-10-22 | 深圳市同洲电子股份有限公司 | Digital television receiver, log system and log management method thereof |
CN101860570A (en) * | 2010-06-10 | 2010-10-13 | 中兴通讯股份有限公司 | Method for backuping and restoring user data of mobile terminal |
EP1684456A4 (en) * | 2003-11-10 | 2011-04-27 | Huawei Tech Co Ltd | A method for data redundancy of hlr |
CN103260089A (en) * | 2012-12-18 | 2013-08-21 | 四川九洲电器集团有限责任公司 | Method for remote check on real-time log of IPTV set top box |
CN107040777A (en) * | 2017-06-08 | 2017-08-11 | 深圳市创维软件有限公司 | A kind of remote debugging method, set top box and server |
CN107092552A (en) * | 2017-03-10 | 2017-08-25 | 武汉斗鱼网络科技有限公司 | A kind of blog management method and device |
-
2018
- 2018-06-07 CN CN201810582360.5A patent/CN108880877A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1684456A4 (en) * | 2003-11-10 | 2011-04-27 | Huawei Tech Co Ltd | A method for data redundancy of hlr |
CN101180614A (en) * | 2005-05-25 | 2008-05-14 | 松下电器产业株式会社 | Device remote monitor/recovery system |
CN101291399A (en) * | 2007-09-25 | 2008-10-22 | 深圳市同洲电子股份有限公司 | Digital television receiver, log system and log management method thereof |
CN101860570A (en) * | 2010-06-10 | 2010-10-13 | 中兴通讯股份有限公司 | Method for backuping and restoring user data of mobile terminal |
CN103260089A (en) * | 2012-12-18 | 2013-08-21 | 四川九洲电器集团有限责任公司 | Method for remote check on real-time log of IPTV set top box |
CN107092552A (en) * | 2017-03-10 | 2017-08-25 | 武汉斗鱼网络科技有限公司 | A kind of blog management method and device |
CN107040777A (en) * | 2017-06-08 | 2017-08-11 | 深圳市创维软件有限公司 | A kind of remote debugging method, set top box and server |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110519465A (en) * | 2019-07-22 | 2019-11-29 | 平安科技(深圳)有限公司 | Telephony platform log inquiring method, terminal device, storage medium and device |
WO2021012489A1 (en) * | 2019-07-22 | 2021-01-28 | 平安科技(深圳)有限公司 | Telephone platform log query method, terminal device, storage medium and apparatus |
CN110519465B (en) * | 2019-07-22 | 2022-06-17 | 平安科技(深圳)有限公司 | Telephone platform log query method, terminal equipment, storage medium and device |
CN110515814A (en) * | 2019-08-16 | 2019-11-29 | 海南车智易通信息技术有限公司 | Full dose log collecting method, device and the mobile terminal of iOS client |
CN110515814B (en) * | 2019-08-16 | 2023-09-19 | 海南车智易通信息技术有限公司 | Method and device for collecting full log of iOS client and mobile terminal |
CN112000405A (en) * | 2020-07-29 | 2020-11-27 | 深圳市智微智能软件开发有限公司 | Method, equipment and storage medium for conveniently acquiring system logs |
CN112203147A (en) * | 2020-09-04 | 2021-01-08 | 深圳创维-Rgb电子有限公司 | Method and device for processing television software log grabbing based on mobile phone and intelligent terminal |
CN112968927A (en) * | 2021-01-28 | 2021-06-15 | 网易(杭州)网络有限公司 | Log extraction method, log extraction device, storage medium and electronic equipment |
CN113592535A (en) * | 2021-06-30 | 2021-11-02 | 北京新氧科技有限公司 | Advertisement recommendation method and device, electronic equipment and storage medium |
CN113592535B (en) * | 2021-06-30 | 2024-04-16 | 北京新氧科技有限公司 | Advertisement recommendation method and device, electronic equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108880877A (en) | A kind of acquisition methods and device of log | |
US11477298B2 (en) | Offline client replay and sync | |
CN105611330B (en) | Smart television maintenance method and system, server and mobile terminal | |
CN107092552B (en) | Log management method and device | |
CN107704360B (en) | Monitoring data processing method, equipment, server and storage medium | |
CN102984586B (en) | The management method of intelligent television application program and device | |
CN112069034B (en) | Fast application exception handling method and device, electronic equipment and storage medium | |
CN110515821B (en) | Event processing method based on buried point, electronic equipment and computer storage medium | |
CN110650164B (en) | File uploading method and device, terminal and computer storage medium | |
WO2023168926A1 (en) | Method and apparatus for determining software anomaly, storage medium, and electronic apparatus | |
US20170286263A1 (en) | System and method for tracking callback functions for error identification | |
CN111177623A (en) | Information processing method and device | |
CN106339273A (en) | Application program restoration method, terminal and server | |
CN105630462A (en) | Violation audio/video program evidence collection method and device | |
CN112486592B (en) | Distributed data processing method, device, server and readable storage medium | |
CN105094777A (en) | Method and device for realizing application screen shot | |
CN113726945A (en) | Cell phone app data automatic acquisition method based on frida framework | |
CN114598687A (en) | Method, system and terminal for capturing HTTPS data packet | |
CN111026637B (en) | Method and device for positioning problem code | |
CN111737625A (en) | Media resource information processing method, processing device, processing system and electronic equipment | |
CN111506339A (en) | Method and device for processing change information of Software Development Kit (SDK) | |
CN112416698A (en) | Monitoring system expansion method and device, storage medium and electronic equipment | |
CN103677882A (en) | Virtual installation device and method of mobile phone program | |
JP5758544B2 (en) | Screen information collection computer, screen information collection method, and computer-readable storage medium | |
CN113761433B (en) | Service processing method and device |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20181123 |
|
RJ01 | Rejection of invention patent application after publication |