[go: up one dir, main page]

CN112817837A - Log management method and terminal - Google Patents

Log management method and terminal Download PDF

Info

Publication number
CN112817837A
CN112817837A CN202110230609.8A CN202110230609A CN112817837A CN 112817837 A CN112817837 A CN 112817837A CN 202110230609 A CN202110230609 A CN 202110230609A CN 112817837 A CN112817837 A CN 112817837A
Authority
CN
China
Prior art keywords
log
remote terminal
state
configuring
channel
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
Application number
CN202110230609.8A
Other languages
Chinese (zh)
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.)
Fuzhou Huisibo Information Technology Co ltd
Original Assignee
Fuzhou Huisibo Information 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 Fuzhou Huisibo Information Technology Co ltd filed Critical Fuzhou Huisibo Information Technology Co ltd
Priority to CN202110230609.8A priority Critical patent/CN112817837A/en
Publication of CN112817837A publication Critical patent/CN112817837A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/3476Data logging
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services

Landscapes

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

Abstract

The invention discloses a log management method and a terminal, which are used for receiving a log acquisition request sent by a remote terminal, configuring an output mechanism of a log according to the log acquisition request and outputting the corresponding log; the log is printed according to the preset storage area and the reading authority, so that an output mechanism of a log module can be configured, the storage area and the reading authority of the output log are managed, and the log transmission can be safely carried out; the corresponding log collection channel is set according to the remote terminal and the state of the remote terminal, the printed log is sent to the remote terminal through the log collection channel, and the corresponding log collection channel can be adaptively selected according to the type and the state of the remote terminal, so that remote log transmission is safely and flexibly realized.

Description

Log management method and terminal
Technical Field
The present invention relates to the field of log management technologies, and in particular, to a log management method and a terminal.
Background
At present, many Android devices in the market, such as mobile phones, POS machines, cash registers and other devices, are often sold in different regions. Various problems may be encountered during the actual use of the device, so that a device manufacturer or an application developer using the device has a requirement for remotely collecting the terminal log. Especially for a POS and a cash register, one system version needs to face different log collection requirements of multiple customers, and the security requirement on the log is high.
Usually, for log collection of Android equipment, or as some mobile phone equipment systems, manufacturers package a log collection strategy, and users can only passively receive log collection and uploading; or there is no guarantee on the security of the log.
Disclosure of Invention
The technical problem to be solved by the invention is as follows: provided are a log management method and a terminal, which can safely and flexibly realize remote log management.
In order to solve the technical problems, the invention adopts the technical scheme that:
a log management method, comprising the steps of:
receiving a log acquisition request sent by a remote terminal, configuring an output mechanism of a log according to the log acquisition request and outputting a corresponding log;
printing the log according to a preset log storage area and a log reading authority;
and setting a corresponding log acquisition channel according to the remote terminal and the state of the remote terminal, and sending the printed log to the remote terminal through the log acquisition channel.
In order to solve the technical problem, the invention adopts another technical scheme as follows:
a log management terminal comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program:
receiving a log acquisition request sent by a remote terminal, configuring an output mechanism of a log according to the log acquisition request and outputting a corresponding log;
printing the log according to a preset log storage area and a log reading authority;
and setting a corresponding log acquisition channel according to the remote terminal and the state of the remote terminal, and sending the printed log to the remote terminal through the log acquisition channel.
The invention has the beneficial effects that: receiving a log acquisition request sent by a remote terminal, configuring an output mechanism of a log according to the log acquisition request and outputting a corresponding log; the log is printed according to the preset storage area and the reading authority, so that an output mechanism of a log module can be configured, the storage area and the reading authority of the output log are managed, and the log transmission can be safely carried out; the corresponding log collection channel is set according to the remote terminal and the state of the remote terminal, the printed log is sent to the remote terminal through the log collection channel, and the corresponding log collection channel can be adaptively selected according to the type and the state of the remote terminal, so that remote log transmission is safely and flexibly realized.
Drawings
FIG. 1 is a flowchart of a log management method according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a log management terminal according to an embodiment of the present invention;
fig. 3 is a schematic diagram illustrating main modules and links of a log management method according to an embodiment of the present invention.
Detailed Description
In order to explain technical contents, achieved objects, and effects of the present invention in detail, the following description is made with reference to the accompanying drawings in combination with the embodiments.
Referring to fig. 1, an embodiment of the present invention provides a log management method, including:
receiving a log acquisition request sent by a remote terminal, configuring an output mechanism of a log according to the log acquisition request and outputting a corresponding log;
printing the log according to a preset log storage area and a log reading authority;
and setting a corresponding log acquisition channel according to the remote terminal and the state of the remote terminal, and sending the printed log to the remote terminal through the log acquisition channel.
From the above description, the beneficial effects of the present invention are: receiving a log acquisition request sent by a remote terminal, configuring an output mechanism of a log according to the log acquisition request and outputting a corresponding log; the log is printed according to the preset storage area and the reading authority, so that an output mechanism of a log module can be configured, the storage area and the reading authority of the output log are managed, and the log transmission can be safely carried out; the corresponding log collection channel is set according to the remote terminal and the state of the remote terminal, the printed log is sent to the remote terminal through the log collection channel, and the corresponding log collection channel can be adaptively selected according to the type and the state of the remote terminal, so that remote log transmission is safely and flexibly realized.
Further, the configuring the output mechanism of the log and outputting the corresponding log comprises:
selecting to start or close log output operation by configuring log output switch options;
configuring a log encryption strategy and a log filtering strategy by configuring a log encryption option and a log filtering option, and outputting a corresponding log according to the configured options;
the log encryption policy comprises:
judging whether the conventional log needs to be encrypted or not according to the state of a remote terminal for collecting the conventional log, and if so, encrypting the conventional log by using a first secret key;
judging whether the system log needs to be encrypted or not according to the state of a remote terminal for acquiring the system log, and if so, encrypting the system log by using a second secret key;
the log filtering policy comprises:
and configuring the filtering options of the logs of each level according to the levels of the logs.
It can be known from the above description that the output mechanism of the log is configured, including the switch configuration of the log output, the log encryption configuration and the log filtering configuration, the output of the log can be flexibly managed through the above configuration options, and the process of the log output can be ensured to be safe and reliable.
Further, the setting of a corresponding log collection channel according to the remote terminal and the state thereof, and the sending of the printed log to the remote terminal through the log collection channel includes:
judging whether the state of the remote terminal is in a development state or a use state, if the state is in the development state, setting an ADB channel as a log acquisition channel, and if the state is in the use state, setting a DLD channel as a log acquisition channel;
and sending the printed log to a remote terminal for collecting the log through the log collection channel based on a secure transport layer protocol.
According to the above description, according to the different states of the remote terminal for collecting the log, the corresponding log collection channel can be established between the development state and the use state and the remote terminal, and the security of transmitting the log to the terminal can be ensured by adaptively adjusting the log collection channel.
Further, the receiving the log collection request sent by the remote terminal includes:
sending a trigger log collection request to a remote terminal, and receiving a log collection request sent by a client of the remote terminal according to the trigger log collection request;
or receiving a log collection request sent by a server of the remote terminal.
As can be seen from the above description, the log collection request may be initiated by the mobile device or the remote terminal, so both the collector and the collector of the log may initiate the log collection request actively, thereby avoiding the situation that the log can only be collected passively, and ensuring the security of the log.
Further, the receiving a log collection request sent by a remote terminal, configuring an output mechanism of a log according to the log collection request, and outputting a corresponding log includes:
receiving a log acquisition request sent by a remote terminal, calling an interface of an output mechanism of the log through a preset application program, configuring the output mechanism of the log and outputting the log;
storing the log in a corresponding directory according to the type of the log;
the printing the log according to a preset log storage area and a management rule of log reading authority comprises the following steps:
and judging whether the application program has the authority of calling the log or not according to the signature information of the application program, and if so, printing the log through a log output printing module.
According to the above description, when the log is collected, the log can be collected through the preset application program, so that the log output mechanism is configured through the preset application program, whether the application program has the authority of calling the log or not needs to be judged before the log is printed, the log collection through the preset application program can be supported, the log transmission safety is ensured, and the safe and flexible remote log transmission is realized.
Referring to fig. 2, an embodiment of the present invention provides a log management terminal, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the computer program to implement the following steps:
receiving a log acquisition request sent by a remote terminal, configuring an output mechanism of a log according to the log acquisition request and outputting a corresponding log;
printing the log according to a preset log storage area and a log reading authority;
and setting a corresponding log acquisition channel according to the remote terminal and the state of the remote terminal, and sending the printed log to the remote terminal through the log acquisition channel.
As can be seen from the above description, a log collection request is received, an output mechanism of the log is configured, and the log is output; printing the output log according to a preset management rule of a storage area and a reading authority, so that an output mechanism of a log module can be configured, the storage area and the reading authority of the output log can be managed, and log transmission can be safely carried out; and setting a corresponding log acquisition channel according to the remote terminal for acquiring the log and the state of the remote terminal, sending the log to the terminal for acquiring the log through the log acquisition channel, and adaptively selecting the corresponding log acquisition channel according to the type and the state of the terminal for acquiring the log, thereby realizing remote log transmission more safely and flexibly.
Further, the configuring the output mechanism of the log and outputting the corresponding log comprises:
selecting to start or close log output operation by configuring log output switch options;
configuring a log encryption strategy and a log filtering strategy by configuring a log encryption option and a log filtering option, and outputting a corresponding log according to the configured options;
the log encryption policy comprises:
judging whether the conventional log needs to be encrypted or not according to the state of a remote terminal for collecting the conventional log, and if so, encrypting the conventional log by using a first secret key;
judging whether the system log needs to be encrypted or not according to the state of a remote terminal for acquiring the system log, and if so, encrypting the system log by using a second secret key;
the log filtering policy comprises:
and configuring the filtering options of the logs of each level according to the levels of the logs.
It can be known from the above description that the output mechanism of the log is configured, including the switch configuration of the log output, the log encryption configuration and the log filtering configuration, the output of the log can be flexibly managed through the above configuration options, and the process of the log output can be ensured to be safe and reliable.
Further, the setting of a corresponding log collection channel according to the remote terminal and the state thereof, and the sending of the printed log to the remote terminal through the log collection channel includes:
judging whether the state of the remote terminal is in a development state or a use state, if the state is in the development state, setting an ADB channel as a log acquisition channel, and if the state is in the use state, setting a DLD channel as a log acquisition channel;
and sending the printed log to a remote terminal for collecting the log through the log collection channel based on a secure transport layer protocol.
According to the above description, according to the different states of the remote terminal for collecting the log, the corresponding log collection channel can be established between the development state and the use state and the remote terminal, and the security of transmitting the log to the terminal can be ensured by adaptively adjusting the log collection channel.
Further, the receiving the log collection request sent by the remote terminal includes:
sending a trigger log collection request to a remote terminal, and receiving a log collection request sent by a client of the remote terminal according to the trigger log collection request;
or receiving a log collection request sent by a server of the remote terminal.
As can be seen from the above description, the log collection request may be initiated by the mobile device or the remote terminal, so both the collector and the collector of the log may initiate the log collection request actively, thereby avoiding the situation that the log can only be collected passively, and ensuring the security of the log.
Further, the receiving a log collection request sent by a remote terminal, configuring an output mechanism of a log according to the log collection request, and outputting a corresponding log includes:
receiving a log acquisition request sent by a remote terminal, calling an interface of an output mechanism of the log through a preset application program, configuring the output mechanism of the log and outputting the log;
storing the log in a corresponding directory according to the type of the log;
the printing the log according to a preset log storage area and a management rule of log reading authority comprises the following steps:
and judging whether the application program has the authority of calling the log or not according to the signature information of the application program, and if so, printing the log through a log output printing module.
According to the above description, when the log is collected, the log can be collected through the preset application program, so that the log output mechanism is configured through the preset application program, whether the application program has the authority of calling the log or not needs to be judged before the log is printed, the log collection through the preset application program can be supported, the log transmission safety is ensured, and the safe and flexible remote log transmission is realized.
The log management method and the terminal provided by the invention are suitable for remote log management of various devices, and are particularly suitable for a scene of safe and flexible remote management of the log of an Android device, and the following description is given by a specific implementation mode:
example one
Referring to fig. 1, a log management method includes the steps of:
s1, receiving a log acquisition request sent by a remote terminal, configuring an output mechanism of a log according to the log acquisition request and outputting the corresponding log;
wherein configuring an output mechanism of the log and outputting the corresponding log comprises:
selecting to start or close log output operation by configuring log output switch options;
configuring a log encryption strategy and a log filtering strategy by configuring a log encryption option and a log filtering option, and outputting a corresponding log according to the configured options;
specifically, in this embodiment, the log module can be turned on or off by configuring an output switch of the log, and the log of the configurable switch includes an AP end log switch and a Modem end log switch;
the log encryption policy comprises:
judging whether the conventional log needs to be encrypted or not according to the state of a remote terminal for collecting the conventional log, and if so, encrypting the conventional log by using a first secret key;
judging whether the system log needs to be encrypted or not according to the state of a remote terminal for acquiring the system log, and if so, encrypting the system log by using a second secret key;
the log filtering policy comprises:
configuring the filtering options of the logs of each level according to the levels of the logs;
specifically, in this embodiment, a manufacturer configures an encryption policy and a filtering policy required by a user according to different user requirements when the manufacturer leaves a factory;
the log Encryption strategy is to divide a main/crash cache into conventional log categories, wherein common logs added by an application program and a system are printed to the main cache, abnormal stack information logs generated when the application program and the system perform log analysis based on java or native crash are printed to the crash cache, and whether the conventional logs need to be encrypted by using an Advanced Encryption Standard (AES) key or not is configured according to the state of a remote terminal; dividing a system/radio/kernel/events cache into system log types, wherein the vast majority of records in the system log are system state and behavior information; whether the system log needs to use an AES key for AES encryption in different remote terminal states can be determined through configuration;
the system log and the conventional log are encrypted by using an AES (advanced encryption standard) key, but the keys used by the system log and the conventional log are not the same, and the keys are separated, so that different control can be performed on the logs of different levels, for example, the key of the system log cannot be provided for a client, and the key of the conventional log may need to be provided for a user for decryption management of the conventional log;
the log filtering strategy is log filtering configuration provided for not printing sensitive logs concerned by users, in the embodiment, the grades of the logs are divided into VERBOSE, DEBUG, INFO, WARN, ERROR and FATAL, and the logs of the grades are filtered when the logs of the grades are respectively configured whether to use the logLogListener or not according to the grades;
s2, printing the log according to a preset log storage area and the log reading authority;
specifically, in this embodiment, the log collection instruction and the log data need to satisfy a TLV (Tag-Length-Value) protocol defined by the authority management module, and the log output printing module may execute the log collection instruction and output the print log;
s3, setting a corresponding log acquisition channel according to the remote terminal and the state of the remote terminal, and sending the printed log to the remote terminal through the log acquisition channel;
judging whether the state of the remote terminal is in a development state or a use state, if the state is in the development state, setting an ADB channel as a log acquisition channel, and if the state is in the use state, setting a DLD channel as a log acquisition channel;
sending the printed log to a remote terminal for collecting the log through a log collection channel based on a secure transport layer protocol;
specifically, if the remote terminal is in a development state, a command and data transmission channel with the remote terminal is set as a standard adb channel, if the remote terminal is in a use state, a command and data transmission channel with the remote terminal is set as a dld channel, and after the remote terminal acquires a log file, a single authentication link based on TLS (Transport Layer Security) sends the log file to a server of the remote terminal;
wherein, the receiving the log collection request sent by the remote terminal comprises:
sending a trigger log collection request to a remote terminal, and receiving a log collection request sent by a client of the remote terminal according to the trigger log collection request;
or receiving a log acquisition request sent by a server of the remote terminal;
specifically, referring to fig. 3, when the Android device sends a log to a manufacturer background through a PC client of a manufacturer, the PC client and the Android device are connected through a USB data line, the Android device triggers a log collection request through a log collection button of the PC, and receives the log collection request sent by the PC client according to the log collection request; configuring a log output switch configuration module and a log encryption and filtering configuration module according to the log acquisition request, and outputting a corresponding log based on a configuration mechanism of the output log; printing logs according to the authority management module and the log output printing module, sending log files to a PC client through a USB, and sending the log files to a manufacturer background server through a TLS protocol by the PC client; the authority management module of the manufacturer background server verifies the equipment identity of the uploaded log file through information such as an account, a password, a token and the like, and after the verification is passed, the log file is stored by the log acquisition module of the manufacturer background server; the encrypted AES key of the conventional log and the encrypted AES key of the system log are respectively stored in a manufacturer background server, and a log decryption module of the manufacturer background server performs AES decryption on the encrypted log file through the two keys;
the method comprises the following steps that a secret key number and an extraction code are designed on a secret key of a manufacturer system, a PC client can display log information submitted by Android equipment or authorized to view according to user authority, and a log file is downloaded through a download button; because the logs are often required to be circulated, if developers or personnel who need to check the logs do not have the authority to check the current logs, only a log uploader needs to transmit the authorization codes of the logs to the personnel who need to check the logs, and the logs corresponding to the authorization codes can be checked through the authorization codes in an unauthorized way;
when a manufacturer background directly and remotely obtains a log file through a network channel of a terminal and the manufacturer background, the terminal and the manufacturer background adopt a bidirectional TLS authentication mode to transmit data and instructions, and the manufacturer background initiates a log output switch and a log acquisition instruction to the terminal;
and after the authority management module of the manufacturer background server side verifies the background identity, a log acquisition instruction is sent through the log acquisition module, and the log acquisition flow and the configuration strategy in the Android device are the same as those when the Android device actively sends a log to the manufacturer background through the PC client of the manufacturer.
Example two
The difference between the present embodiment and the first embodiment is that another log management method is provided:
specifically, the receiving a log collection request sent by a remote terminal, configuring an output mechanism of a log according to the log collection request, and outputting a corresponding log includes:
receiving a log acquisition request sent by a remote terminal, calling an interface of an output mechanism of the log through a preset application program, configuring the output mechanism of the log and outputting the log;
storing the log in a corresponding directory according to the type of the log;
the printing the log according to a preset log storage area and a management rule of log reading authority comprises the following steps:
judging whether the application program has the authority of calling the log or not according to the signature information of the application program, if so, printing the log through a log output printing module;
specifically, referring to fig. 3, the Android device can use a self-developed application and a client backend server to perform log collection, and for a scenario where a user self-develops an APK (Android application package) and a backend performs terminal log collection, in this embodiment, collection and printout of a log are not performed without limitation by the user, but some specified interfaces are provided, and the user obtains the log of the terminal according to a specified interface function and an access specification, so that a certain degree of freedom is provided for the user under the condition of ensuring the security of the terminal log and the security of the system;
the APK sets an interface related to log acquisition by calling an interface provided by a log acquisition service module, and specifically comprises an acquisition switch interface, a file size control interface, a residual space limiting interface, a log storage time limit interface and a single acquisition duration interface;
in this embodiment, the log saving directory specified by the client background server is located under the Share directory during the log storing path, so as to limit reading and writing of other applications, different log types are stored under different sub-directories, and the APK cannot specify the log saving path;
the log collection service in the Android device authenticates the identity of a client background server side calling the log, the application signature information of the client background server side needs to contain the authority specified by the log collection service, and the log collection service can print the log through a log output printing module after authenticating the APK; the log filtering and encryption strategy configuration is executed according to the configuration specified by the manufacturer, and is not opened to the APK control of the user.
EXAMPLE III
Referring to fig. 2, a log management terminal includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the computer program to implement the steps of the log management method in the first embodiment or the second embodiment.
In summary, the log management method and the terminal provided by the present invention receive a log acquisition request sent by a remote terminal, configure an output mechanism of a log according to the log acquisition request, and output a corresponding log, wherein when configuring the output mechanism, an output switch, an encryption policy, and a filtering policy of the log can be configured, so as to flexibly manage output of the log, and ensure a safe and reliable log output process; the log is printed according to the preset storage area and the reading authority, so that an output mechanism of a log module can be configured, the storage area and the reading authority of the output log are managed, and the safety of log transmission can be ensured; setting a corresponding log acquisition channel according to the remote terminal and the state of the remote terminal, and sending the printed log to the remote terminal through the log acquisition channel, wherein the state of the remote terminal can be divided into a use state and a development state, and the corresponding log acquisition channel is adaptively selected according to the type and the state of the remote terminal, so that remote log transmission is realized more safely and flexibly; the invention supports to actively send the log collection instruction to the remote terminal, and both the collection party and the collected party of the log can actively initiate the log collection request, thereby ensuring the security of the log collection; meanwhile, the Android device is supported to use the self-developed APK and the client background server side to collect the log, and log management is further flexibly realized.
The above description is only an embodiment of the present invention, and not intended to limit the scope of the present invention, and all equivalent changes made by using the contents of the present specification and the drawings, or applied directly or indirectly to the related technical fields, are included in the scope of the present invention.

Claims (10)

1. A log management method, comprising the steps of:
receiving a log acquisition request sent by a remote terminal, configuring an output mechanism of a log according to the log acquisition request and outputting a corresponding log;
printing the log according to a preset log storage area and a log reading authority;
and setting a corresponding log acquisition channel according to the remote terminal and the state of the remote terminal, and sending the printed log to the remote terminal through the log acquisition channel.
2. The log management method of claim 1, wherein configuring the output mechanism of the log and outputting the corresponding log comprises:
selecting to start or close log output operation by configuring log output switch options;
configuring a log encryption strategy and a log filtering strategy by configuring a log encryption option and a log filtering option, and outputting a corresponding log according to the configured options;
the log encryption policy comprises:
judging whether the conventional log needs to be encrypted or not according to the state of a remote terminal for collecting the conventional log, and if so, encrypting the conventional log by using a first secret key;
judging whether the system log needs to be encrypted or not according to the state of a remote terminal for acquiring the system log, and if so, encrypting the system log by using a second secret key;
the log filtering policy comprises:
and configuring the filtering options of the logs of each level according to the levels of the logs.
3. The log management method according to claim 1, wherein the setting of a corresponding log collection channel according to the remote terminal and the status thereof, and the sending of the printed log to the remote terminal through the log collection channel comprises:
judging whether the state of the remote terminal is in a development state or a use state, if the state is in the development state, setting an ADB channel as a log acquisition channel, and if the state is in the use state, setting a DLD channel as a log acquisition channel;
and sending the printed log to a remote terminal for collecting the log through the log collection channel based on a secure transport layer protocol.
4. The log management method according to any one of claims 1 to 3, wherein the receiving the log collection request sent by the remote terminal includes:
sending a trigger log collection request to a remote terminal, and receiving a log collection request sent by a client of the remote terminal according to the trigger log collection request;
or receiving a log collection request sent by a server of the remote terminal.
5. The log management method according to any one of claims 1 to 3, wherein the receiving a log collection request sent by a remote terminal, configuring an output mechanism of a log according to the log collection request, and outputting the corresponding log comprises:
receiving a log acquisition request sent by a remote terminal, calling an interface of an output mechanism of the log through a preset application program, configuring the output mechanism of the log and outputting the log;
storing the log in a corresponding directory according to the type of the log;
the printing the log according to a preset log storage area and a management rule of log reading authority comprises the following steps:
and judging whether the application program has the authority of calling the log or not according to the signature information of the application program, and if so, printing the log through a log output printing module.
6. A log management terminal comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:
receiving a log acquisition request sent by a remote terminal, configuring an output mechanism of a log according to the log acquisition request and outputting a corresponding log;
printing the log according to a preset log storage area and a log reading authority;
and setting a corresponding log acquisition channel according to the remote terminal and the state of the remote terminal, and sending the printed log to the remote terminal through the log acquisition channel.
7. The log management terminal of claim 6, wherein configuring the output mechanism of the log and outputting the corresponding log comprises:
selecting to start or close log output operation by configuring log output switch options;
configuring a log encryption strategy and a log filtering strategy by configuring a log encryption option and a log filtering option, and outputting a corresponding log according to the configured options;
the log encryption policy comprises:
judging whether the conventional log needs to be encrypted or not according to the state of a remote terminal for collecting the conventional log, and if so, encrypting the conventional log by using a first secret key;
judging whether the system log needs to be encrypted or not according to the state of a remote terminal for acquiring the system log, and if so, encrypting the system log by using a second secret key;
the log filtering policy comprises:
and configuring the filtering options of the logs of each level according to the levels of the logs.
8. The log management terminal of claim 6, wherein the setting of the corresponding log collection channel according to the remote terminal and the status thereof, and the sending of the printed log to the remote terminal through the log collection channel comprises:
judging whether the state of the remote terminal is in a development state or a use state, if the state is in the development state, setting an ADB channel as a log acquisition channel, and if the state is in the use state, setting a DLD channel as a log acquisition channel;
and sending the printed log to a remote terminal for collecting the log through the log collection channel based on a secure transport layer protocol.
9. The log management terminal according to any one of claims 6 to 8, wherein the receiving the log collection request sent by the remote terminal comprises:
sending a trigger log collection request to a remote terminal, and receiving a log collection request sent by a client of the remote terminal according to the trigger log collection request;
or receiving a log collection request sent by a server of the remote terminal.
10. The log management terminal according to any one of claims 6 to 8, wherein the receiving a log collection request sent by a remote terminal, configuring an output mechanism of a log according to the log collection request, and outputting a corresponding log comprises:
receiving a log acquisition request sent by a remote terminal, calling an interface of an output mechanism of the log through a preset application program, configuring the output mechanism of the log and outputting the log;
storing the log in a corresponding directory according to the type of the log;
the printing the log according to a preset log storage area and a management rule of log reading authority comprises the following steps:
and judging whether the application program has the authority of calling the log or not according to the signature information of the application program, and if so, printing the log through a log output printing module.
CN202110230609.8A 2021-03-02 2021-03-02 Log management method and terminal Pending CN112817837A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110230609.8A CN112817837A (en) 2021-03-02 2021-03-02 Log management method and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110230609.8A CN112817837A (en) 2021-03-02 2021-03-02 Log management method and terminal

Publications (1)

Publication Number Publication Date
CN112817837A true CN112817837A (en) 2021-05-18

Family

ID=75862712

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110230609.8A Pending CN112817837A (en) 2021-03-02 2021-03-02 Log management method and terminal

Country Status (1)

Country Link
CN (1) CN112817837A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120096465A1 (en) * 2010-10-18 2012-04-19 Ricoh Company, Ltd. Image forming apparatus, log management method, and storage medium
CN107688536A (en) * 2017-08-23 2018-02-13 上海与德科技有限公司 A kind of method and device for obtaining terminal system daily record
CN111984508A (en) * 2020-08-25 2020-11-24 成都安恒信息技术有限公司 Remote log acquisition method based on bastion machine
CN112148699A (en) * 2020-09-28 2020-12-29 平安数字信息科技(深圳)有限公司 Log management method, device, equipment and medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120096465A1 (en) * 2010-10-18 2012-04-19 Ricoh Company, Ltd. Image forming apparatus, log management method, and storage medium
CN107688536A (en) * 2017-08-23 2018-02-13 上海与德科技有限公司 A kind of method and device for obtaining terminal system daily record
CN111984508A (en) * 2020-08-25 2020-11-24 成都安恒信息技术有限公司 Remote log acquisition method based on bastion machine
CN112148699A (en) * 2020-09-28 2020-12-29 平安数字信息科技(深圳)有限公司 Log management method, device, equipment and medium

Similar Documents

Publication Publication Date Title
US9916574B2 (en) Secure computing device and method
KR101517286B1 (en) Updating an operating system for secure element
KR100783446B1 (en) Data Security System, Apparatus and Method Using UsB Device
EP2443584B1 (en) Remote access control of storage devices
US20050188219A1 (en) Method and a system for communication between a terminal and at least one communication equipment
CN103080946A (en) Method, secure device, system and computer program product for securely managing files
WO2013182155A1 (en) Firmware version upgrade method and system
CN101589398A (en) Upgrading a memory card that has security mechanisms that prevent copying of secure content and applications
CN103136463A (en) System and method for temporary secure boot process of electronic device
EP2357859B1 (en) An authentication method for the mobile terminal and a system thereof
CN103051456B (en) The method and system of application program in a kind of management intelligent SD card
CN111786820B (en) Firmware updating method and device and network equipment
CN109977039A (en) HD encryption method for storing cipher key, device, equipment and readable storage medium storing program for executing
US8181006B2 (en) Method and device for securely configuring a terminal by means of a startup external data storage device
JP5722464B2 (en) Mobile terminal and network lock method thereof
EP1411428B1 (en) A method for setting configuration information of a storage device
US8918143B2 (en) Change of the subscription in an identification module
EP3639186B1 (en) Method for managing an instance of a class
CN116226946A (en) Policies for hardware changes or overlay opening in computing devices
KR102434275B1 (en) Remote resetting to factory default settings, a method and a device
CN110196741A (en) Method for setting basic input/output system, terminal and computer storage medium
CN112817837A (en) Log management method and terminal
CN103955652A (en) File encryption method and device based on Andriod equipment authentication
KR20130141371A (en) Methods for backup and restoration of profile in euicc environment and devices therefor
CN107862209B (en) File encryption and decryption method, mobile terminal and device with storage function

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20210518