CN115617612A - Log reporting method and device, computer equipment and storage medium - Google Patents

Log reporting method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN115617612A
CN115617612A CN202211321177.2A CN202211321177A CN115617612A CN 115617612 A CN115617612 A CN 115617612A CN 202211321177 A CN202211321177 A CN 202211321177A CN 115617612 A CN115617612 A CN 115617612A
Authority
CN
China
Prior art keywords
log
information
acquisition
collection
reporting
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
CN202211321177.2A
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.)
Ping An Bank Co Ltd
Original Assignee
Ping An Bank 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 Ping An Bank Co Ltd filed Critical Ping An Bank Co Ltd
Priority to CN202211321177.2A priority Critical patent/CN115617612A/en
Publication of CN115617612A publication Critical patent/CN115617612A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3065Monitoring arrangements determined by the means or processing involved in reporting the monitored data
    • G06F11/3068Monitoring arrangements determined by the means or processing involved in reporting the monitored data where the reporting involves data format conversion
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3065Monitoring arrangements determined by the means or processing involved in reporting the monitored data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/1805Append-only file systems, e.g. using logs or journals to store data
    • G06F16/1815Journaling file systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Human Computer Interaction (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the application discloses a log reporting method, a log reporting device, computer equipment and a storage medium; the embodiment of the application comprises the following steps: acquiring information acquisition configuration information for an application program; collecting log information of the application program on a plurality of different dimensions based on the information collection configuration information; integrating the log information on a plurality of different dimensions based on the acquisition subject information in the information acquisition configuration information to obtain at least one acquisition log; respectively storing each acquisition log to a corresponding target folder based on acquisition subject information corresponding to each acquisition log; and receiving a reporting instruction, and reporting the target folder based on the reporting instruction, so that the working efficiency of testing and development can be improved, and the production quality of the application program is improved.

Description

Log reporting method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of communications technologies, and in particular, to a log reporting method and apparatus, a computer device, and a storage medium.
Background
At present, when a front-end defect is submitted, user data can be provided when the problem is described, the problem is checked and positioned only after the defect is solved and obtained through a recurrent problem by front-end development and system and log information, and if the recurrent defect is difficult to recur, most of the defects can be delayed or processed after recurrent. Therefore, in the daily defect solving process, the acquisition of the related system and log information takes much time, and the accidental defects are not provided with much reference during processing.
Disclosure of Invention
The embodiment of the application provides a log reporting method and device, computer equipment and a storage medium, which can improve the working efficiency of testing and developing an application program, thereby improving the production quality.
The embodiment of the application provides a log reporting method, which comprises the following steps:
acquiring information acquisition configuration information aiming at an application program;
collecting log information of the application program on a plurality of different dimensions based on the information collection configuration information;
integrating the log information on the plurality of different dimensions based on the acquisition subject information in the information acquisition configuration information to obtain at least one acquisition log;
respectively storing each acquisition log to a corresponding target folder based on the acquisition subject information corresponding to each acquisition log;
and receiving a reporting instruction, and reporting the target folder based on the reporting instruction.
Correspondingly, an embodiment of the present application further provides a log reporting apparatus, including:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring information acquisition configuration information aiming at an application program;
the acquisition unit is used for acquiring log information of the application program on a plurality of different dimensions based on the information acquisition configuration information;
the integration unit is used for integrating the log information on the plurality of different dimensions based on the acquisition subject information in the information acquisition configuration information to obtain at least one acquisition log;
the storage unit is used for storing each acquisition log to a corresponding target folder based on the acquisition main body information corresponding to each acquisition log;
and the reporting unit is used for receiving a reporting instruction and reporting the target folder based on the reporting instruction.
In an embodiment, the acquisition unit may include:
the first analysis subunit is used for analyzing the information acquisition configuration information to obtain log acquisition permission information;
the verification subunit is used for verifying the log acquisition authority information;
and the acquisition subunit is used for acquiring the log information of the application program in a plurality of different dimensions when the log acquisition authority information passes.
In an embodiment, the acquisition subunit may include:
the analysis module is used for analyzing the information acquisition configuration information to obtain at least one data acquisition dimension information when the log acquisition permission information passes;
and the calling module is used for calling the data acquisition component to acquire the log information of the application program on a plurality of different dimensions based on the at least one data acquisition dimension information.
In one embodiment, the integration unit may include:
the second analysis subunit is used for analyzing the information of the acquisition main bodies to obtain data acquisition indication information of each acquisition main body;
the combination subunit is configured to, based on the data acquisition instruction information of each acquisition main body, perform combination processing on the log information in the multiple different dimensions to obtain a data group corresponding to each acquisition main body;
and the packaging subunit is used for packaging the data group corresponding to each acquisition main body to obtain the at least one acquisition log.
In one embodiment, the combination subunit may include:
the screening module is used for screening out log information corresponding to the dimensionality matched with the data acquisition indicating information from the log information on the multiple different dimensionalities based on the data acquisition indicating information of the acquisition main body;
the authority verification module is used for performing authority verification on the acquisition main body based on the log information corresponding to the matched dimensionality;
and the combination module is used for combining the log information corresponding to the matched dimensionality into the data group when the authority verification passes.
In one embodiment, the packaging subunit may include:
the identification module is used for identifying the log information in the data group to obtain a data error instruction in the log information;
the mapping module is used for mapping the data error instruction to obtain a log reference grade;
the typesetting module is used for typesetting the log information in the data group according to a preset typesetting format to obtain an initial acquisition log;
and the setting module is used for setting the log grade for the initial acquisition log based on the log reference grade to obtain the acquisition log.
In one embodiment, the storage unit may include:
the determining subunit is used for determining the folder to be stored corresponding to each acquisition log based on the acquisition main body information corresponding to each acquisition log;
the identification subunit is used for identifying the folder to be stored to obtain attribute information corresponding to the folder to be stored;
and the storage subunit is used for storing the acquisition log to the folder to be stored to obtain the target folder when the attribute information of the folder to be stored meets a preset storage condition.
Correspondingly, the embodiment of the application also provides computer equipment, which comprises a memory and a processor; the memory stores a computer program, and the processor is configured to run the computer program in the memory to execute any of the log reporting methods provided in the embodiments of the present application.
Correspondingly, an embodiment of the present application further provides a storage medium, where a computer program is stored, and when the computer program is executed by a processor, the log reporting method provided in any embodiment of the present application is implemented.
The embodiment of the application comprises the following steps: acquiring information acquisition configuration information aiming at an application program; acquiring log information of an application program on a plurality of different dimensions based on information acquisition configuration information; integrating the log information on a plurality of different dimensions based on the acquisition subject information in the information acquisition configuration information to obtain at least one acquisition log; respectively storing each acquisition log to a corresponding target folder based on acquisition subject information corresponding to each acquisition log; the method and the device for testing and developing the target folder can improve the working efficiency of testing and developing through the embodiment of the application, and therefore production quality is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the description below are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic view of a scenario of a log reporting method provided in an embodiment of the present application;
fig. 2 is a schematic flowchart of a log reporting method provided in an embodiment of the present application;
fig. 3 is another schematic view of a scenario of a log reporting method according to an embodiment of the present application;
fig. 4 is another schematic flow chart of a log reporting method according to an embodiment of the present application;
fig. 5 is another schematic view of a scenario of a log reporting method according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a log reporting apparatus according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of a computer device provided in an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, however, the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments of the present application. 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 application.
The embodiment of the application provides a log reporting method, which can be executed by a log reporting device, and the log reporting device can be integrated in computer equipment with at least one log reporting hardware. Wherein the computer device may comprise at least one of a computer device and a server, etc. That is, the log reporting method provided in the embodiment of the present application may be executed by a computer device, a server, or both a terminal and a server that can communicate with each other.
The terminal can be a smart phone, a tablet Computer, a notebook Computer, a Personal Computer (PC), a smart home, a wearable electronic device, a VR/AR device, a vehicle-mounted Computer, and the like. The server may be an interworking server or a background server among a plurality of heterogeneous systems, an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, a cloud server providing basic cloud computing services such as cloud service, a cloud database, cloud computing, cloud functions, cloud storage, network service, cloud communication, middleware service, domain name service, security service, big data and artificial intelligence platforms, and the like.
In an embodiment, as shown in fig. 1, a log reporting apparatus may be integrated on a terminal 10 to implement the log reporting method provided in the embodiment of the present application. Specifically, the terminal 10 may acquire information collection configuration information for an application; acquiring log information of an application program on a plurality of different dimensions based on information acquisition configuration information; integrating the log information on a plurality of different dimensions based on the acquisition subject information in the information acquisition configuration information to obtain at least one acquisition log; respectively storing each acquisition log to a corresponding target folder based on acquisition subject information corresponding to each acquisition log; and receiving a reporting instruction, and reporting the target folder to the server 11 based on the reporting instruction.
The following are detailed below, and it should be noted that the order of description of the following examples is not intended to limit the preferred order of the examples.
The embodiment of the present application will be described from the perspective of a log reporting device, which may be integrated in a computer device.
As shown in fig. 2, a log reporting method is provided, and the specific process includes:
101. and acquiring information acquisition configuration information aiming at the application program.
The application program comprises a computer program for completing one or more specific functions, is operated in an interaction mode, can interact with a use object of the application program, and has a visual display interface.
For example, the application programs may include application software on various terminals. For example, the Application program may include various mobile phone software (APP), tablet Application software, application software on a notebook Computer, application software on a Personal Computer (PC), and the like.
For example, the application programs may include browsers, video playback software, game software, and so forth.
As another example, an application may also include an applet. Among them, a Mini Program (Mini Program) is an application that can be used without downloading and installation. In order to provide more diversified business services to users, developers can develop corresponding applets for applications (such as instant messaging applications, shopping applications, mail applications, and the like) of the terminal, the applets can be embedded into the applications of the terminal as sub-applications, and the corresponding business services can be provided for the users by running the sub-applications (i.e., the corresponding applets) in the applications.
In one embodiment, the application may be an application associated with a financial transaction, through which a user may be supported for financial operations. For example, the application program can support the user to transfer money, purchase fund and the like.
The information acquisition configuration information may include information generated after a developer performs differential configuration for a log acquisition process based on requirements. Through the information acquisition configuration information, the log reporting device can be set to acquire information and process the acquired information.
For example, the information collection configuration information may include collection subject information, collection period, log collection authority information, data collection dimension information, and the like.
In one embodiment, the application generates a plurality of different dimensions of information. For example, the information generated by the application may include user operation information and information generated in the system itself, and the like. The user operation information may include information of various interface operations performed by the user in the application program, and the like. In the information generated by the application program, the log reporting device can collect information required by developers or business personnel according to data collection dimension information without collecting all information.
In one embodiment, an application may be developed jointly by multiple departments within an enterprise. For example, function a in an application is developed by department a in the enterprise, and function B in an application is developed by department B in the enterprise. For the information collected by the log reporting device, each department generally only concerns the information related to the self development function, but not all the information. Therefore, the information required by each department can be determined according to the main body acquisition information. Then, according to the information required by each department, an acquisition log corresponding to each department can be generated, so that the acquisition log acquired by each department is required by the department. Therefore, when each department tests the functions of the application program according to the collected logs, the collected logs can be directly utilized to test or analyze the functions of the application program without processing such as filtering and integrating the information in the collected logs, and therefore the testing efficiency and the problem analysis efficiency of the functions are improved.
In an embodiment, some of the information collected by the log reporting device may relate to privacy of the user. In order to protect the privacy of the user and improve the information security, the authority for log reporting can be set through log collection authority information. For example, the log collection switch can be uniformly controlled by the log collection authority information. The log collection is allowed only if the log collection authority information is set to allow the log switch to be controlled in a unified manner. For example, the log collection authority information can limit that the log can only be reported to some departments, but not to all departments. For another example, when the log reporting device is integrated on the terminal of the user, there are two locations in the terminal where the logs can be stored, which are the test packet and the production packet. The test packet can provide information for a developer or a service worker to perform a test, and therefore, the test packet can store the log collected by the log reporting device. And for the production package, the stored data is provided for the user, so the log collected by the log reporting device cannot be stored in the production package. Therefore, the log storage place can be controlled through the log collection authority information, and the log is prevented from being stored in a production package to cause information leakage.
In one embodiment, the collection period may set when the data reporting device collects information. For example, the collection period may be configured to be 1 week, and the data reporting device may collect information once every other week. When the data reporting device collects data according to the collection period, the data reporting device can acquire information collection configuration information for the application program, and then collect information according to the information collection configuration information.
102. And collecting log information of the application program on a plurality of different dimensions based on the information collection configuration information.
In an embodiment, the data reporting device may collect log information of the application program in multiple different dimensions based on the information collection configuration information.
In the embodiment of the application, the log collection switch can be controlled in a unified manner. And only when the log collection authority information is set to allow the log switch to be controlled in a unified mode, the log collection is allowed. The log collection control method comprises the steps of setting a log collection authority information in information collection configuration information, and setting a switch for uniformly controlling log collection.
Therefore, the step of "collecting log information of an application program in a plurality of different dimensions based on information collection configuration information" may include:
analyzing the information acquisition configuration information to obtain log acquisition authority information;
verifying the log acquisition authority information;
when the log collection authority information passes, the log information of the application program on a plurality of different dimensions is collected.
In an embodiment, the information collection configuration information may be analyzed to obtain log collection authority information. Then, the log collection authority information is verified. When the log collection authority information passes, the log information of the application program on a plurality of different dimensions can be collected in a supporting mode. When the log collection authority information does not pass, the log collection method cannot support collection of log information of the application program in multiple different dimensions.
For example, the log collection authority information may be in the form of a password. When the log collection authority information is matched with the preset password, the log collection authority information is verified. The log collection authority information is matched with the preset password, and the log collection authority information can be the same as the preset password or can satisfy a certain relation with the preset password. For example, the log collection authority information and a preset password satisfy a certain preset value after arithmetic operation, and the like.
For another example, when the log collection authority information is "1", it may be stated that the log collection authority information passes the verification, and the collection of the log information of the application program in a plurality of different dimensions may be supported. And when the log collection authority information is '0', the log collection authority information is not verified, and the log collection authority information cannot support collection of the log information of the application program in multiple different dimensions.
In an embodiment, when the log collection authority information passes, the data reporting device may be supported to collect the log information of the application program in multiple different dimensions. The data reporting device needs to know which dimensionalities of data to acquire, so that when the log acquisition permission information passes, the information acquisition configuration information is analyzed to obtain at least one data acquisition dimensionality information. And then, acquiring data according to the at least one data acquisition dimension information.
Specifically, the step of collecting log information of the application program in multiple different dimensions when the log collection authority information passes through may include:
when the log collection authority information passes, analyzing the information collection configuration information to obtain at least one data collection dimension information;
and calling a data acquisition component to acquire log information of the application program on a plurality of different dimensions based on the at least one data acquisition dimension information.
In an embodiment, when the log collection authority information passes, the information collection configuration information may be parsed to obtain at least one data collection dimension information. A data collection component can then be invoked to collect log information of the application in a plurality of different dimensions based on the at least one data collection dimension information.
Wherein the data collection component may be LogUtils. The data acquisition component LogUtils can uniformly control the on-off of log acquisition, the log level, the packet name/service name/cause part where the log is printed, log output time, log content, read-write files, sensitive information encryption and the like.
For example, the log reporting device can know that the current login user information, user operation, logic processing record, page jump record and interface request need to be acquired by analyzing the information acquisition configuration information. Then, the log reporting device can call LogUtils to collect log information of current login user information, user operation, logic processing record, page jump record and interface request. The user operation may include clicking, inputting, selecting, and the like. The interface request may include request time, interface name, request entry and request status, and exit.
103. And integrating the log information on a plurality of different dimensions based on the acquisition main body information in the information acquisition configuration information to obtain at least one acquisition log.
In an embodiment, after the log information in different dimensions is acquired, in order to improve the testing efficiency, the log information in multiple different dimensions may be integrated based on the acquisition subject information in the information acquisition configuration information to obtain at least one acquisition log.
For example, an application may be developed jointly by multiple departments within an enterprise. For example, function a in an application is developed by department a in an enterprise, and function B in an application is developed by department B in an enterprise. For the information collected by the log reporting device, each department generally only concerns the information related to the self development function, but not all the information. Therefore, the information required by each department can be determined according to the main body acquisition information. Then, according to the information required by each department, an acquisition log corresponding to each department can be generated, so that the acquisition log acquired by each department is required by the department. Therefore, when each department tests the functions of the application program according to the collected logs, the collected logs can be directly utilized to test or analyze the functions of the application program without processing such as filtering and integrating the information in the collected logs, and therefore the testing efficiency and the problem analysis efficiency of the functions are improved.
In an embodiment, the step of "performing integration processing on log information in a plurality of different dimensions based on collection subject information in the information collection configuration information to obtain at least one collection log" may include:
analyzing the information of the acquisition main bodies to obtain data acquisition indication information of each acquisition main body;
combining the log information on a plurality of different dimensions based on the data acquisition indication information of each acquisition main body to obtain a data group corresponding to each acquisition main body;
and packaging the data group corresponding to each acquisition main body to obtain at least one acquisition log.
In an embodiment, the collection subject information may be analyzed to obtain data collection indication information of each collection subject. The data acquisition indication information of each acquisition subject can be used for explaining which information is required by each acquisition subject.
Then, the log information in multiple different dimensions can be combined and processed based on the data acquisition instruction information of each acquisition subject, so as to obtain a data group corresponding to each acquisition subject. Specifically, the step of combining the log information in a plurality of different dimensions based on the data acquisition instruction information of each acquisition subject to obtain the data group corresponding to each acquisition subject may include:
screening out log information corresponding to the dimensionality matched with the data acquisition indicating information from the log information on a plurality of different dimensionalities on the basis of the data acquisition indicating information of the acquisition main body;
based on the log information corresponding to the matched dimensionality, performing authority verification on the collection main body;
and when the authority verification is passed, combining the log information corresponding to the matched dimensionality into a data group.
In an embodiment, log information corresponding to a dimension matching the data acquisition indication information may be screened out from the log information in a plurality of different dimensions based on the data acquisition indication information of the acquisition subject. For example, if the data collection instruction information of the collection subject a indicates that log information related to the function a is required, the log reporting device will collect the log information related to the function a. For another example, if the data collection instruction information of the collection subject B indicates that log information related to the function B is required, the log reporting device collects the log information related to the function B.
In an embodiment, in order to further improve the security of the information, each department may be limited to only obtain log information related to itself, and may not obtain log information of other departments. Therefore, after the log information corresponding to the dimension matched with the data acquisition indication information is screened, the authority of the acquisition main body can be verified and whether the acquisition main body is qualified to acquire the log information corresponding to the current dimension can be judged based on the log information corresponding to the matched dimension. For example, the data acquisition instruction information of the acquisition subject B indicates that log information related to the function B is required, and after the authority verification is performed on the acquisition subject B, the acquisition subject B passes the authority verification, which indicates that the log information related to the function B can be combined into a data group. For another example, the data acquisition instruction information of the acquisition subject B indicates that log information related to the function c is required, and after the authority verification is performed on the acquisition subject B, the acquisition subject B does not pass the authority verification, so that the log information is not combined into a data group.
In an embodiment, after the data group corresponding to each acquisition subject is obtained, the data group corresponding to each acquisition subject may be packaged to obtain at least one acquisition log, where each acquisition log corresponds to one acquisition subject.
The data group corresponding to each acquisition main body can be packaged in various modes to obtain the acquisition log corresponding to each acquisition main body.
For example, the log information in the data group may be directly typeset according to a preset typesetting format, so as to obtain the collection log corresponding to the collection subject.
For another example, in order to facilitate the tester or the developer to process the collected logs, a log reference level may be set for the collected logs, so that the tester or the developer may view various collected logs with emphasis according to the daily reference level.
Specifically, the step of performing encapsulation processing on the data group corresponding to each acquisition subject to obtain at least one acquisition log may include:
identifying log information in the data group to obtain a data error instruction in the log information;
mapping the data error instruction to obtain a log reference grade;
performing typesetting processing on log information in the data group according to a preset typesetting format to obtain an initial acquisition log;
and setting a log grade for the initial acquisition log based on the log reference grade to obtain the acquisition log.
In one embodiment, log information in the data group may be identified, and a data error instruction in the log information may be obtained. For example, data Error instructions may include Debug, info, warning, error, and Fatal. The Debug may indicate that the Error recorded in the log information is only a small Error, the Info may indicate that the Error recorded in the log information is a low-level Error, the Warning may indicate that the Error recorded in the log information is an Error that needs to be emphasized, the Error may indicate that the Error recorded in the log information is an Error that needs to be reported, and the total may indicate that the Error recorded in the log information is an important Error.
Then, mapping processing can be carried out on the data error instruction to obtain a log reference level. For example, the grades corresponding to Debug, info, warning, error and fat are 1-5 respectively, and the higher the reference grade of the log is, the more important the collection of the log is.
In an embodiment, the log information in the data group may be typeset according to a preset typesetting format, so as to obtain an initial collection log. For example, according to a preset typesetting format, the log information in the data group is typeset, and the obtained initial collection log may be "[ 14/8/4/2022: 22] [ finance for consumption ] [ info ] [ documents/Aladdin/plugs/loanCMy/index 51.Html ]: thissidaemolog ".
Then, a log grade can be set for the initial collection log based on the log reference grade, so as to obtain the collection log. For example, a log rank may be added to the initial acquisition log, resulting in an acquisition log. For example, the collection log may be "[2] [2022 year 8, month 4, day 14:22] [ finance for consumption ] [ info ] [ documents/Aladdin/plugs/loncmy/index51. Html ]: thissidaemolog ".
104. And respectively storing each acquisition log to a corresponding target folder based on the acquisition main body information corresponding to each acquisition log.
In an embodiment, in order to facilitate management of the collection logs, each collection log may be stored in a corresponding target folder based on the collection subject information corresponding to each collection log.
In one embodiment, when the log reporting device is integrated on the user's terminal, there are two locations in the terminal where logs, i.e., the test packets and the production packets, can be stored. The test packet can provide information for developers or business personnel to test, so that the test packet can store logs collected by the log reporting device. And for the production package, the stored data is provided for the user, so the log collected by the log reporting device cannot be stored in the production package. Therefore, the log storage place can be controlled through the log collection authority information, and the log is prevented from being stored in a production package to cause information leakage.
In order to improve the information security, whether the folder to be stored in the collection log is a test package or a production package can be judged. Specifically, the step of storing each collection log to a corresponding target folder respectively based on the collection subject information corresponding to each collection log may include:
determining a folder to be stored corresponding to each acquisition log based on acquisition subject information corresponding to each acquisition log;
identifying the folder to be stored to obtain attribute information corresponding to the folder to be stored;
and when the attribute information of the folder to be stored meets the preset storage condition, storing the collected log into the folder to be stored to obtain a target folder.
In an embodiment, the folder to be stored corresponding to each collection log may be determined based on the collection subject information corresponding to each collection log. For example, each department may correspond to a folder to be stored. For example, as shown in fig. 3, folder 1 may be used to store the collection log of department a, folder 2 may be used to store the collection log of department B, and folder 3 may be used to store the collection log of department C.
And then, identifying the folder to be stored to obtain attribute information corresponding to the folder to be stored. For example, when the folder to be stored is a production package, the collection log is not stored in the folder to be stored. And when the folder to be stored is the test package, storing the collection log into the folder to be stored to obtain the target folder.
In one embodiment, the attribute information of the folder to be stored may indicate whether the folder to be stored is a production package or a test package. And when the folder to be stored is a production package, the collection log is not stored in the folder to be stored. And when the folder to be stored is the test package, storing the collection log into the folder to be stored so as to obtain the target folder.
105. And receiving a reporting instruction, and reporting the target folder based on the reporting instruction.
In an embodiment, after the log reporting device receives the reporting instruction, the log reporting device may report the target folder based on the reporting instruction. For example, a folder corresponding to each department may be reported, and then each department may acquire a collection log required by itself.
The embodiment of the application provides a log reporting method, which comprises the following steps: acquiring information acquisition configuration information aiming at an application program; acquiring log information of an application program on a plurality of different dimensions based on information acquisition configuration information; integrating the log information on a plurality of different dimensions based on the acquisition subject information in the information acquisition configuration information to obtain at least one acquisition log; respectively storing each acquisition log to a corresponding target folder based on the acquisition subject information corresponding to each acquisition log; and receiving a reporting instruction, and reporting the target folder based on the reporting instruction. The embodiment of the application can record the detailed information, is used for developing and troubleshooting when the defects are submitted, can improve the problem solving efficiency, reduce the accidental problem investigation time and reduce the number of the defects which are delayed due to the irreproducible problems, thereby improving the working efficiency of testing and developing and improving the production quality. In addition, in order to prevent the problems of user sensitive information collection and leakage, the log collection function can be uniformly turned on or off according to the input parameters (production/test environment) during packaging.
The method described in the above examples is further illustrated in detail below by way of example.
The method of the embodiment of the present application will be described by taking an example in which a log reporting method is integrated in a terminal.
In an embodiment, as shown in fig. 4, a log reporting method specifically includes the following processes:
201. the terminal acquires information acquisition configuration information for the application program.
For example, the application bottom layer provides the tool class method LogUtils. The tool method LogUtils can uniformly control the log collection switch, the log level, the packet name/service name/cause part where the log is printed, the log output time, the log content, the read-write file, the sensitive information encryption and the like.
202. The terminal collects log information of the application program in multiple different dimensions based on the information collection configuration information.
In an embodiment, the terminal may call the LogUtils collection application to collect log information in multiple different dimensions based on the information collection configuration information.
203. The terminal integrates the log information in a plurality of different dimensions based on the collection main body information in the information collection configuration information to obtain at least one collection log.
If the data acquisition instruction information of the acquisition subject a indicates that the log information related to the function a is required, the log reporting device acquires the log information related to the function a. For another example, if the data collection instruction information of the collection subject B indicates that log information related to the function B is required, the log reporting device collects the log information related to the function B.
For example, as shown in fig. 5, by performing the layout processing on the log information in the data group, the obtained collection log may be "[ 14, 8, 4, 2022: 22] [ finance for consumption ] [ info ] [ documents/Aladdin/plugs/loncmy/index51. Html ]: thissidaemolog ".
204. And the terminal stores each acquisition log to a corresponding target folder respectively based on the acquisition main body information corresponding to each acquisition log.
For example, each department may correspond to a folder to be stored. For example, as shown in fig. 3, the folder 1 may be used to store the collection logs of the department a, the folder 2 may be used to store the collection logs of the department B, and the folder 3 may be used to store the collection logs of the department C.
And then, identifying the folder to be stored to obtain attribute information corresponding to the folder to be stored. For example, when the folder to be stored is a production package, the collection log is not stored in the folder to be stored. And when the folder to be stored is the test package, storing the collection log into the folder to be stored to obtain the target folder.
In one embodiment, the attribute information of the folder to be stored may indicate whether the folder to be stored is a production package or a test package. And when the folder to be stored is a production package, the collection log is not stored in the folder to be stored. And when the folder to be stored is the test package, storing the collection log into the folder to be stored so as to obtain the target folder.
In one embodiment, folders are created in the terminal memory, and the log contents output by each service line/cause are recorded in their respective folders, each of which can control the file size, and can be recorded in different files according to the log output date or the total log size.
In order to prevent the problem of collecting or leaking production sensitive information, the following method can be adopted:
(1) The method comprises the following steps: when the front-end App packs, if the test packets are uniformly controlled, the log accommodating function can be started by default, and if the test packets are production packets, the accommodating function is automatically closed by default.
(2) The second method comprises the following steps: the LogUtils log printing tool is packaged into a compression packet, the log printing function is not introduced during production of the packet, and the log printing function is added during test of the packet, so that the log accommodating function is prevented from being opened by someone carelessly in the production environment.
205. And the terminal receives the reporting instruction and reports the target folder based on the reporting instruction.
The embodiment of the application provides an operation method, which comprises the following steps: the terminal acquires information acquisition configuration information aiming at the application program; the terminal collects log information of the application program on a plurality of different dimensions based on information collection configuration information; the terminal integrates the log information on a plurality of different dimensions based on the collection main body information in the information collection configuration information to obtain at least one collection log; the terminal respectively stores each acquisition log to a corresponding target folder based on the acquisition main body information corresponding to each acquisition log; and the terminal receives the reporting instruction and reports the target folder based on the reporting instruction. By the embodiment of the application, the working efficiency of testing and development can be improved, and the production quality of the application program is improved.
In order to better implement the log reporting method provided in the embodiment of the present application, in an embodiment, a log reporting device is further provided, and the log reporting device may be integrated in a computer device. The meaning of the noun is the same as that in the log reporting method of the product, and specific implementation details can refer to the description in the method embodiment.
In an embodiment, a log reporting apparatus is provided, where the log reporting apparatus may be specifically integrated in a computer device, such as a television, and as shown in fig. 6, the log reporting apparatus includes: the acquisition unit 301, the acquisition unit 302, the integration unit 303, the storage unit 304 and the reporting unit 305 are specifically as follows:
an obtaining unit 301, configured to obtain information acquisition configuration information for an application;
an acquisition unit 302, configured to acquire log information of the application program in multiple different dimensions based on the information acquisition configuration information;
an integrating unit 303, configured to integrate the log information in the multiple different dimensions based on the collection subject information in the information collection configuration information, to obtain at least one collection log;
the storage unit 304 is configured to store each acquisition log to a corresponding target folder based on the acquisition subject information corresponding to each acquisition log;
a reporting unit 305, configured to receive a reporting instruction, and report the target folder based on the reporting instruction.
In an embodiment, the acquiring unit 302 may include:
the first analysis subunit is used for analyzing the information acquisition configuration information to obtain log acquisition permission information;
the verification subunit is used for verifying the log acquisition authority information;
and the acquisition subunit is used for acquiring the log information of the application program on a plurality of different dimensions when the log acquisition authority information passes.
In an embodiment, the acquisition subunit may include:
the analysis module is used for analyzing the information acquisition configuration information to obtain at least one data acquisition dimension information when the log acquisition permission information passes;
and the calling module is used for calling the data acquisition component to acquire the log information of the application program on a plurality of different dimensions based on the at least one data acquisition dimension information.
In an embodiment, the integrating unit 303 may include:
the second analysis subunit is used for analyzing the information of the acquisition main bodies to obtain data acquisition indication information of each acquisition main body;
the combination subunit is configured to perform combination processing on the log information in the multiple different dimensions based on the data acquisition instruction information of each acquisition main body to obtain a data group corresponding to each acquisition main body;
and the packaging subunit is used for packaging the data group corresponding to each acquisition main body to obtain the at least one acquisition log.
In one embodiment, the combination subunit may include:
the screening module is used for screening out log information corresponding to the dimensionality matched with the data acquisition indicating information from the log information on the multiple different dimensionalities based on the data acquisition indicating information of the acquisition main body;
the authority verification module is used for verifying the authority of the acquisition main body based on the log information corresponding to the matched dimensionality;
and the combination module is used for combining the log information corresponding to the matched dimensionality into the data group when the authority verification passes.
In one embodiment, the packaging subunit may include:
the identification module is used for identifying the log information in the data group to obtain a data error instruction in the log information;
the mapping module is used for mapping the data error instruction to obtain a log reference grade;
the typesetting module is used for typesetting the log information in the data group according to a preset typesetting format to obtain an initial acquisition log;
and the setting module is used for setting the log grade for the initial acquisition log based on the log reference grade to obtain the acquisition log.
In an embodiment, the storage unit 304 may include:
the determining subunit is used for determining a folder to be stored corresponding to each acquisition log based on the acquisition main body information corresponding to each acquisition log;
the identification subunit is used for identifying the folder to be stored to obtain attribute information corresponding to the folder to be stored;
and the storage subunit is used for storing the acquisition log to the folder to be stored to obtain the target folder when the attribute information of the folder to be stored meets a preset storage condition.
In specific implementation, the above units may be implemented as independent entities, or may be combined arbitrarily, and implemented as the same or several entities, and specific implementations of the above units may refer to the foregoing method embodiment, which is not described herein again.
The log reporting device can improve the working efficiency of testing and development, thereby improving the production quality.
The embodiment of the present application further provides a computer device, where the computer device may include a computer device or a server, for example, the computer device may serve as a log reporting computer device, and the log reporting computer device may be an intelligent television or the like; for example, the computer device may be a server, such as a log reporting server. Fig. 7 is a schematic diagram showing a structure of a computer device according to an embodiment of the present application, specifically:
the computer device may include components such as a processor 401 of one or more processing cores, memory 402 of one or more computer-readable storage media, a power supply 403, and an input unit 404. Those skilled in the art will appreciate that the computer device configuration illustrated in FIG. 7 does not constitute a limitation of computer devices, and may include more or fewer components than those illustrated, or some components may be combined, or a different arrangement of components. Wherein:
the processor 401 is a control center of the computer device, connects various parts of the entire computer device using various interfaces and lines, and performs various functions of the computer device and processes data by running or executing software programs and/or modules stored in the memory 402 and calling data stored in the memory 402, thereby monitoring the computer device as a whole. Optionally, processor 401 may include one or more processing cores; preferably, the processor 401 may integrate an application processor, which mainly handles operating system, user pages, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 401.
The memory 402 may be used to store software programs and modules, and the processor 401 executes various functional applications and log reporting by operating the software programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data created according to use of the computer device, and the like. Further, the memory 402 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 access to the memory 402.
The computer device further comprises a power supply 403 for supplying power to the various components, and preferably, the power supply 403 is logically connected to the processor 401 via a power management system, so that functions of managing charging, discharging, and power consumption are implemented via the power management system. The power supply 403 may also include any component of one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
The computer device may also include an input unit 404, the input unit 404 being operable to receive input numeric or character information and to generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
Although not shown, the computer device may further include a display unit and the like, which are not described in detail herein. Specifically, in this embodiment, the processor 401 in the computer device loads the executable file corresponding to the process of one or more application programs into the memory 402 according to the following instructions, and the processor 401 runs the application programs stored in the memory 402, thereby implementing various functions as follows:
acquiring information acquisition configuration information for an application program;
collecting log information of the application program on a plurality of different dimensions based on the information collection configuration information;
integrating the log information on the plurality of different dimensions based on the acquisition subject information in the information acquisition configuration information to obtain at least one acquisition log;
respectively storing each acquisition log to a corresponding target folder based on the acquisition subject information corresponding to each acquisition log;
and receiving a reporting instruction, and reporting the target folder based on the reporting instruction.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
According to an aspect of the application, a computer program product or computer program is provided, comprising computer instructions, the computer instructions being stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the computer device to perform the method provided in the various alternative implementations of the above embodiments.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be implemented by a computer program, which may be stored in a computer-readable storage medium and loaded and executed by a processor, or by a computer program controlling associated hardware.
To this end, an embodiment of the present application further provides a storage medium, where a computer program is stored, and the computer program can be loaded by a processor to execute any step in the log reporting method provided in the embodiment of the present application. For example, the computer program may perform the steps of:
acquiring information acquisition configuration information aiming at an application program;
collecting log information of the application program on a plurality of different dimensions based on the information collection configuration information;
integrating the log information on the plurality of different dimensions based on the acquisition subject information in the information acquisition configuration information to obtain at least one acquisition log;
respectively storing each acquisition log to a corresponding target folder based on acquisition subject information corresponding to each acquisition log;
and receiving a reporting instruction, and reporting the target folder based on the reporting instruction.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
Since the computer program stored in the storage medium can execute the steps in any log reporting method provided in the embodiments of the present application, beneficial effects that can be achieved by any log reporting method provided in the embodiments of the present application can be achieved, which are detailed in the foregoing embodiments and will not be described herein again.
The method, the apparatus, the computer device and the storage medium for reporting logs provided by the embodiments of the present application are introduced in detail, and a specific example is applied in the present application to explain the principle and the implementation of the present application, and the description of the embodiments is only used to help understanding the method and the core idea of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. A log reporting method is characterized by comprising the following steps:
acquiring information acquisition configuration information aiming at an application program;
collecting log information of the application program on a plurality of different dimensions based on the information collection configuration information;
integrating the log information on the plurality of different dimensions based on the acquisition subject information in the information acquisition configuration information to obtain at least one acquisition log;
respectively storing each acquisition log to a corresponding target folder based on acquisition subject information corresponding to each acquisition log;
and receiving a reporting instruction, and reporting the target folder based on the reporting instruction.
2. The method of claim 1, wherein collecting log information of the application program in a plurality of different dimensions based on the information collection configuration information comprises:
analyzing the information acquisition configuration information to obtain log acquisition authority information;
verifying the log acquisition authority information;
and when the log collection authority information passes, collecting the log information of the application program on a plurality of different dimensions.
3. The method of claim 2, wherein collecting log information of the application program in a plurality of different dimensions when the log collection authority information passes comprises:
when the log collection authority information passes, analyzing the information collection configuration information to obtain at least one data collection dimension information;
and calling a data acquisition component to acquire log information of the application program on a plurality of different dimensions based on the at least one data acquisition dimension information.
4. The method according to claim 1, wherein the integrating, based on the collection subject information in the information collection configuration information, the log information in the plurality of different dimensions to obtain at least one collection log comprises:
analyzing the information of the acquisition main bodies to obtain data acquisition indication information of each acquisition main body;
based on the data acquisition indication information of each acquisition main body, combining the log information on the plurality of different dimensions to obtain a data group corresponding to each acquisition main body;
and packaging the data group corresponding to each acquisition main body to obtain the at least one acquisition log.
5. The method according to claim 4, wherein the combining the log information in the plurality of different dimensions based on the data acquisition instruction information of each acquisition subject to obtain the data group corresponding to each acquisition subject comprises:
screening out log information corresponding to the dimensionality matched with the data acquisition indicating information from the log information on the multiple different dimensionalities based on the data acquisition indicating information of the acquisition main body;
based on the log information corresponding to the matched dimensionality, performing authority verification on the acquisition main body;
and when the authority passes the verification, combining the log information corresponding to the matched dimensionality into the data group.
6. The method of claim 4, wherein the encapsulating the data group corresponding to each collection subject to obtain the at least one collection log comprises:
identifying log information in the data group to obtain a data error instruction in the log information;
mapping the data error instruction to obtain a log reference grade;
performing typesetting processing on the log information in the data group according to a preset typesetting format to obtain an initial acquisition log;
and setting a log grade for the initial acquisition log based on the log reference grade to obtain the acquisition log.
7. The method according to claim 1, wherein the storing each collection log to a corresponding target folder based on the collection subject information corresponding to each collection log comprises:
determining a folder to be stored corresponding to each acquisition log based on acquisition subject information corresponding to each acquisition log;
identifying the folder to be stored to obtain attribute information corresponding to the folder to be stored;
and when the attribute information of the folder to be stored meets a preset storage condition, storing the collection log to the folder to be stored to obtain the target folder.
8. A log reporting apparatus, comprising:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring information acquisition configuration information aiming at an application program;
the acquisition unit is used for acquiring log information of the application program on a plurality of different dimensions based on the information acquisition configuration information;
the integration unit is used for integrating the log information on the plurality of different dimensions based on the acquisition subject information in the information acquisition configuration information to obtain at least one acquisition log;
the storage unit is used for storing each acquisition log to a corresponding target folder respectively based on the acquisition main body information corresponding to each acquisition log;
and the reporting unit is used for receiving a reporting instruction and reporting the target folder based on the reporting instruction.
9. A computer device comprising a memory and a processor; the memory stores a computer program, and the processor is configured to run the computer program in the memory to perform the log reporting method according to any one of claims 1 to 7.
10. A storage medium storing a plurality of computer programs, the computer programs being suitable for being loaded by a processor to execute the log reporting method according to any one of claims 1 to 7.
CN202211321177.2A 2022-10-26 2022-10-26 Log reporting method and device, computer equipment and storage medium Pending CN115617612A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211321177.2A CN115617612A (en) 2022-10-26 2022-10-26 Log reporting method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211321177.2A CN115617612A (en) 2022-10-26 2022-10-26 Log reporting method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115617612A true CN115617612A (en) 2023-01-17

Family

ID=84865151

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211321177.2A Pending CN115617612A (en) 2022-10-26 2022-10-26 Log reporting method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115617612A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116545685A (en) * 2023-04-28 2023-08-04 零束科技有限公司 In-vehicle verification failure information management method, communication system, vehicle and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116545685A (en) * 2023-04-28 2023-08-04 零束科技有限公司 In-vehicle verification failure information management method, communication system, vehicle and storage medium

Similar Documents

Publication Publication Date Title
CN105283849B (en) For the Parallel Tracking of performance and details
CN105283852B (en) A kind of method and system of fuzzy tracking data
CN105103147B (en) With work load distributor come the method and system that track
CN105122230A (en) Tracing as a service
CN109284269A (en) Abnormal log analysis method, device, storage medium and server
EP3134812A1 (en) Executing third-party application
CN110990053A (en) Method for creating and using machine learning scheme template and device
US20120159566A1 (en) Access control framework
CN107273250B (en) Testing method and device of electronic insurance policy automatic underwriting system
CN115617612A (en) Log reporting method and device, computer equipment and storage medium
US10394793B1 (en) Method and system for governed replay for compliance applications
CN113568833A (en) Test case determination method and device, computer equipment and readable storage medium
CN112860556A (en) Coverage rate statistical method, coverage rate statistical device, computer system and readable storage medium
CN111488603A (en) Method and device for identifying sensitive content of printed file
CN110162982B (en) Method and device for detecting illegal rights, storage medium and electronic equipment
CN108830664A (en) Difference electronics indigo plant ticket generation method, equipment and computer readable storage medium
CN102053862B (en) Method and device for inspecting material files in instant messenger
CN110231921A (en) Log Method of printing, device, equipment and computer readable storage medium
CN114816815A (en) Fault positioning method, log format configuration method, equipment and storage medium
CN111241547A (en) Detection method, device and system for unauthorized vulnerability
CN114637685A (en) Performance test method, device, equipment and medium of application program in bank system
CN114895879A (en) Management system design scheme determining method, device, equipment and storage medium
CN114969175A (en) Method for butting insurance platform and external system and related equipment
CN116132250A (en) Operation and maintenance system, operation and maintenance method, storage medium and electronic equipment
CN110889104B (en) Data acquisition method and device for Android system equipment

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