CN115934468A - Log acquisition method and device and computer readable storage medium - Google Patents

Log acquisition method and device and computer readable storage medium Download PDF

Info

Publication number
CN115934468A
CN115934468A CN202211608290.9A CN202211608290A CN115934468A CN 115934468 A CN115934468 A CN 115934468A CN 202211608290 A CN202211608290 A CN 202211608290A CN 115934468 A CN115934468 A CN 115934468A
Authority
CN
China
Prior art keywords
function
log
log information
authority
user
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
CN202211608290.9A
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.)
Hozon New Energy Automobile Co Ltd
Original Assignee
Hozon New Energy Automobile 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 Hozon New Energy Automobile Co Ltd filed Critical Hozon New Energy Automobile Co Ltd
Priority to CN202211608290.9A priority Critical patent/CN115934468A/en
Publication of CN115934468A publication Critical patent/CN115934468A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The application discloses a log collection method, a log collection device and a computer readable storage medium, which are applied to a software as a service (SaaS) platform, wherein the method comprises the following steps: acquiring a user authority tree, and judging whether a current user needs to perform functional operation related to the authority of acquiring log information according to the user authority tree; if the current user needs to perform the function operation related to the authority for acquiring the log information, performing corresponding function parameter configuration; acquiring corresponding log information according to the function authority corresponding to the configured function parameters; and storing the collected log information in a database and synchronizing the log information to the alarm service. Therefore, log collection and monitoring are achieved according to the atomic function log configuration parameters operated by the user, service coupling is reduced, and management and monitoring of log information are facilitated for an administrator user more conveniently.

Description

Log acquisition method and device and computer readable storage medium
Technical Field
The present application relates to the field of log collection technologies, and in particular, to a log collection method and apparatus, and a computer-readable storage medium.
Background
With the rapid development of the information industry, the internet has become a main media tool in the current society, and the use of computers, mobile internet devices and the like has rapidly developed. In the internet environment, an increasing number of application platforms are used, and when a user operates on an application platform, corresponding operation information is generated on the application platform, and the operation information can be used for analyzing and managing the application platform.
The existing recording operation information of the application platform needs to be integrally planned at the initial stage of system construction, the behavior of a user accessing the database is intercepted by adopting a bypass monitoring mode through a network where a database server is arranged, and unified log collection and centralized management analysis are carried out. Meanwhile, the collected service logs are subjected to standardized processing, and massive original logs are filtered and merged based on different strategies, so that the initial construction cost and the later reconstruction optimization cost are high.
Disclosure of Invention
The application aims to provide a log collection method, a log collection device and a computer readable storage medium, which can realize log collection and monitoring according to atomic function log configuration parameters operated by a user, reduce service coupling and facilitate management and monitoring of log information by an administrator user more conveniently.
In order to achieve the above purpose:
in a first aspect, an embodiment of the present application provides a log collection method, which is applied to a SaaS platform and includes the following steps:
acquiring a user authority tree, and judging whether a current user needs to perform function operation related to the authority for acquiring log information according to the user authority tree;
if the current user needs to perform the function operation related to the authority for acquiring the log information, performing corresponding function parameter configuration;
acquiring corresponding log information according to the function authority corresponding to the configured function parameters;
and storing the acquired log information in a database and synchronizing the log information to an alarm service.
Optionally, if the current user needs to perform a function operation related to the authority for obtaining the log information, performing corresponding function parameter configuration, including:
if the current user needs to perform relevant function operation, configuring and storing the function parameters corresponding to the log information acquisition permission, and marking the function point of the current user according to the configured function parameters;
and if the current user does not need to perform related function operation, not configuring the function parameters corresponding to the log information acquisition permission.
Optionally, acquiring corresponding log information according to the function permission corresponding to the configured function parameter further includes:
judging whether the user function point contains a mark point for parameter configuration or not according to the log identifier;
if the user function point comprises a mark point of parameter configuration, determining that the user has performed corresponding function parameter configuration, and acquiring log information of a corresponding function according to the marked function parameter authority;
and if the user function point does not contain the mark point of the parameter configuration, determining that the user does not perform the function parameter configuration, and directly sending an access record to the server without acquiring log information.
Optionally, the storing the collected log information in a database and synchronizing to an alarm service includes:
acquiring the service object and the function authority configured by the current user and the collected log information; the business object comprises ID information of the current user;
recording the function authority and the collected log information according to a preset log module to generate an operation log, and storing the operation log;
and synchronizing the generated operation log information into an alarm service so as to generate visual data corresponding to the specific change condition of the log according to the operation log.
Optionally, the method further includes:
monitoring the change condition, the change time and the service object of the log information in real time;
and if the log information is judged to be abnormal or the monitoring is wrong, skipping to an alarm service according to the log change time or the service object to check the detailed information of the log change content.
In a second aspect, an embodiment of the present application provides a log collecting device, where the log collecting device includes:
the parameter configuration module is used for acquiring a user authority tree and judging whether a current user needs to perform function operation related to the authority for acquiring the log information according to the user authority tree; if the current user needs to perform related function operation related to the authority for acquiring the log information, performing corresponding function parameter configuration;
the log acquisition module is used for acquiring corresponding log information according to the function authority corresponding to the configured function parameters;
and the information storage module is used for storing the acquired log information in a database and synchronizing the log information to the alarm service.
Optionally, the parameter configuration module is specifically configured to:
acquiring a user authority tree, and judging whether a current user needs to perform functional operation related to the authority of acquiring log information according to the user authority tree;
if the current user needs to perform related function operation, configuring and storing the function parameters corresponding to the log information acquisition permission, and marking the function point of the current user according to the configured function parameters; and if the current user does not need to perform related function operation, not configuring the function parameter corresponding to the log information acquisition permission.
Optionally, the log collecting module is specifically configured to:
judging whether the user function point contains a mark point for parameter configuration or not according to the log identifier;
if the user function point comprises a mark point of parameter configuration, determining that the user has performed corresponding function parameter configuration, and acquiring log information of a corresponding function according to the marked function parameter authority; and if the user function point does not contain the mark point of the parameter configuration, determining that the user does not carry out the function parameter configuration, and directly sending an access record to a server without carrying out the log information acquisition.
In a third aspect, an embodiment of the present application discloses an electronic device, including: a memory storing executable program code; a processor coupled with the memory; the processor calls the executable program code stored in the memory for executing the log collection method according to the first aspect.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium, in which a computer program is stored, and when a processor of an electronic device executes instructions in the computer-readable storage medium, the electronic device is enabled to implement the log collecting method according to the first aspect.
The log acquisition method, the log acquisition device and the computer-readable storage medium provided by the embodiment of the application are applied to a software as a service (SaaS) platform, and the method comprises the following steps: acquiring a user authority tree, and judging whether a current user needs to perform functional operation related to the authority of acquiring log information according to the user authority tree; if the current user needs to perform the function operation related to the authority for acquiring the log information, performing corresponding function parameter configuration; acquiring corresponding log information according to the function authority corresponding to the configured function parameters; and storing the collected log information in a database, and synchronizing the log information to the alarm service. Therefore, log collection and monitoring are achieved according to the atomic function log configuration parameters operated by the user, service coupling is reduced, and management and monitoring of log information are facilitated for an administrator user more conveniently.
Drawings
Fig. 1 is a schematic flowchart of a log collection method according to a preferred embodiment of the present invention;
fig. 2 is a schematic flowchart illustrating a specific process of log configuration in a log collection method according to a preferred embodiment of the present invention;
fig. 3 is a schematic flowchart illustrating a specific process of log collection in a log collection method according to a preferred embodiment of the present invention;
fig. 4 is a schematic flowchart illustrating a specific process of log monitoring in a log collection method according to a preferred embodiment of the present invention;
fig. 5 is a schematic structural diagram of a log collection device according to a preferred embodiment of the present invention;
fig. 6 is a schematic structural diagram of a log collection device according to another preferred embodiment of the present invention.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
It should be noted that step numbers such as S101 and S102 are used herein for the purpose of more clearly and briefly describing the corresponding contents, and do not constitute a substantial limitation on the sequence, and those skilled in the art may perform S102 first and then S101 in specific implementations, but these steps should be within the scope of the present application.
It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
Referring to fig. 1, for the log collecting method provided in the embodiment of the present application, the log collecting method may be executed by the log collecting device provided in the embodiment of the present application, and the log collecting device may be implemented in a software and/or hardware manner, where the log collecting device in this embodiment is applied to a server as an example, and the log collecting method provided in this embodiment includes the following steps:
step S101: and acquiring a user authority tree, and judging whether the current user needs to perform functional operation related to the authority for acquiring the log information according to the user authority tree.
In one embodiment, a user authority tree is obtained, the authority tree is maintained based on a SaaS platform, and whether functional operations related to obtaining log information authority are needed or not is judged for a current user based on the authority tree, wherein the functional operations include judging whether log collection is needed or not, log collection operation types, collected log information and the like.
Step S102: and if the current user needs to perform the functional operation related to the authority for acquiring the log information, performing corresponding functional parameter configuration.
In an embodiment, if it is determined that the current user needs to perform the related operation, configuring and storing the functional parameters corresponding to the authority for obtaining the log information, marking and dotting the user functional points according to the configured functional parameters, and marking the functional points of the user that need to collect and correspondingly collect the log information.
In an embodiment, if it is determined that the current user does not need to perform the related function operation, the function point of the user is not configured with the function parameter corresponding to the log information acquisition permission.
Step S103: and acquiring corresponding log information according to the function authority corresponding to the configured function parameters.
In one embodiment, a log identifier of a user is obtained, whether the user function point comprises a parameter configuration mark point is judged according to the log identifier, if the user function point comprises the parameter configuration mark point, it is determined that the user has performed corresponding function parameter configuration, and user mark function point information and corresponding log information are acquired along with almost marked function parameter authorities. Here, acquiring the authority to acquire the log is to acquire information according to the existing link, and a new business process does not need to be built.
In an embodiment, if the user function point does not include a mark point for parameter configuration, it is determined that the user does not perform the function parameter configuration, and an access record is directly sent to a server without acquiring log information. For example, three function points a, B and C are arranged in the system, a log acquisition log B is needed when the function point B is marked through function configuration, which function authorities the log acquisition needs is judged when the log acquisition is performed, if the authority of the function point a and the authority of the function point B are provided, the authority of the function point a and the authority of the function point B are opened to the log, if the function operation is the authority of the function point B, whether the function point B has a marked point for acquiring the log is judged, if the mark point is included, the log acquisition is performed according to the marked function authority, if the mark point is not included, the log acquisition is not performed, and the request is directly and normally sent to the server for request.
Step S104: and storing the acquired log information in a database and synchronizing the log information to an alarm service.
In an embodiment, after log information collection is performed, a service pair configured by the current user, a function right and the collected log information are obtained, where the service object includes ID information of the current user. And recording the log information with the brand new function and the collected log information according to a preset log module to generate an operation log, and storing the operation log information to realize real-time monitoring on the change condition, the change time and the service object of the log information.
In an embodiment, the generated operation log information is synchronized to an alarm service, so as to generate visual data corresponding to the specific change condition of the log according to the operation log. When the log information is judged to be abnormal or the log information is judged to be monitored in an error mode in the process of monitoring the operation log, the operation log jumps to an alarm service according to the change time and the service object of the corresponding log information to view the detailed information of the change content of the corresponding log.
In summary, in the log collection method provided in the above embodiment, the user function point is configured according to the authority tree, and the log information is collected according to the configured function authority, and the request is directly made to the server when there is no configuration, so that service coupling is reduced, and real-time monitoring is set, which is beneficial to obtaining the log information.
Referring to fig. 2, for a specific implementation method of log configuration in the log collection method provided in the embodiment of the present application, the method described in fig. 2 is a more detailed description of the log configuration method in the method described in fig. 1, where the log configuration method in the log collection method includes the following steps:
step S201: and acquiring the authority tree.
Step S202: and judging whether to perform function configuration according to the authority tree.
In an embodiment, a user authority tree is obtained, the authority tree is maintained based on a SaaS platform, and a current user is judged whether functional operations related to obtaining log information authority need to be carried out based on the authority tree, wherein the functional operations include judging whether logs need to be collected, log collection operation types, collected log information and the like.
Step S203: if the corresponding function configuration is carried out, the corresponding configuration is stored, and the configuration function authority is marked.
In an embodiment, if it is determined that the current user needs to perform the related operation, configuring and storing the functional parameters corresponding to the authority for obtaining the log information, marking and dotting the user functional points according to the configured functional parameters, and marking the functional points of the user that need to collect and correspondingly collect the log information.
In an embodiment, if it is determined that the current user does not need to perform the related function operation, the function point of the user is not configured with the function parameter corresponding to the log information acquisition permission.
In summary, in the log configuration method in the log collection method provided above, the function configuration related to the log information acquisition permission is performed on the user function point according to the user permission tree, which is beneficial to performing information acquisition according to the configured function permission when log collection is performed.
Referring to fig. 3, for a specific implementation method of log collection in the log collection method provided in the embodiment of the present application, the method described in fig. 3 is a more detailed description of the log collection in the method described in fig. 1, where the log collection method in the log collection method includes the following steps:
step S301: and logging in an account.
Step S302: and acquiring the user right of log access.
Step S303: and collecting log information.
In one embodiment, a log identifier of a user is obtained, whether the user function point comprises a parameter configuration mark point is judged according to the log identifier, if the user function point comprises the parameter configuration mark point, it is determined that the user has performed corresponding function parameter configuration, and user mark function point information and corresponding log information are acquired along with almost marked function parameter authorities. Here, acquiring the authority to acquire the log is to acquire information according to the existing link, and a new service flow does not need to be set up.
In an embodiment, if the user function point does not include a mark point for parameter configuration, it is determined that the user does not perform the function parameter configuration, and an access record is directly sent to a server without acquiring log information. For example, three function points a, B and C are arranged in the system, a log acquisition log B is needed when the function point B is marked through function configuration, which function authorities the log acquisition needs is judged when the log acquisition is performed, if the authority of the function point a and the authority of the function point B are provided, the authority of the function point a and the authority of the function point B are opened to the log, if the function operation is the authority of the function point B, whether the function point B has a marked point for acquiring the log is judged, if the mark point is included, the log acquisition is performed according to the marked function authority, if the mark point is not included, the log acquisition is not performed, and the request is directly and normally sent to the server for request.
Step S304: and entering the parameter according to the log template parameter.
In an embodiment, after log information collection is performed, a service pair configured by the current user, a function right and the collected log information are obtained, where the service object includes ID information of the current user. And recording the function brand new and collected log information according to a preset log module to generate an operation log.
Step S305: and connecting with a database according to the operation log.
Step S306: and recording and storing the operation log.
In one embodiment, the operation log information is stored to realize simple monitoring of the log information. Here, the generated operation log information is synchronized into an alarm service, so as to generate visual data corresponding to the specific change condition of the log according to the operation log.
In summary, in the log collection method provided above, the function permission is configured according to the function point corresponding to the user to collect the log information and record and store the collected log information, so that the system can more conveniently obtain the operation log information.
Referring to fig. 4, for a specific implementation method of log monitoring in the log collection method provided in the embodiment of the present application, the method described in fig. 4 is a more detailed description of the log monitoring in the method described in fig. 1, where the log monitoring method in the log collection method includes the following steps:
step S401: and (5) monitoring a query log.
Step S402: and acquiring corresponding log data.
Step S403: and checking the log details.
Step S404: and positioning the corresponding service and acquiring the service details.
And if the log information is judged to be abnormal or the log information is judged to be monitored in an error mode in the process of monitoring the operation log, skipping to an alarm service according to the change time and the service object of the corresponding log information to check the detailed information of the change content of the corresponding log.
Step S405: and checking by the skip service module.
In summary, the log monitoring method in the log collection method provided above is helpful for effectively monitoring log information by simply monitoring the operation information in real time and knowing a detailed log process in the alarm service by changing time or a business object when determining that an abnormality is caused.
Based on the same inventive concept of the foregoing embodiments, the method provided by the foregoing embodiments is described in detail below by a specific example.
Referring to fig. 5, the log collecting device provided in the embodiment of the present application includes a parameter configuration module, a log collecting module, and an information storage module, where the log collecting module includes a first module, a second module, and a third module
The parameter configuration module is used for acquiring a user authority tree and judging whether a current user needs to perform function operation related to the authority of acquiring log information according to the user authority tree; if the current user needs to perform related function operation related to the authority for acquiring the log information, performing corresponding function parameter configuration;
the log acquisition module is used for acquiring corresponding log information according to the function authority corresponding to the configured function parameters;
and the information storage module is used for storing the acquired log information in a database and synchronizing the log information to the alarm service.
In an embodiment, the parameter configuration module is specifically configured to obtain a user permission tree, maintain the permission tree based on a SaaS platform, and determine, based on the permission tree, whether to perform a function operation related to obtaining a log information permission on a current user, where the function operation includes determining whether to acquire a log, a log operation type, and acquired log information.
In an embodiment, if it is determined that the current user needs to perform the related operation, configuring and storing the functional parameters corresponding to the authority for obtaining the log information, marking and dotting the user functional points according to the configured functional parameters, and marking the functional points of the user that need to collect and correspondingly collect the log information. Here, if it is determined that the current user does not need to perform the related function operation, the function point of the user is not configured with the function parameter corresponding to the log information acquisition permission.
In an embodiment, the log collection module is specifically configured to obtain a log identifier of a user, determine whether the user function point includes a mark point for parameter configuration according to the log identifier, determine that the user has performed corresponding function parameter configuration if the user function point includes the mark point for parameter configuration, and collect user mark function point information and corresponding log information along with almost the marked function parameter authority. Here, acquiring the authority to acquire the log is to acquire information according to the existing link, and a new business process does not need to be built.
In an embodiment, if the user function point does not include a mark point for parameter configuration, it is determined that the user does not perform function parameter configuration, and an access record is directly sent to the log collection module without collecting log information. For example, three function points a, B and C are arranged in the system, a log acquisition log B is required for marking the function point B through function configuration, which function authorities the user has are judged when the log acquisition is performed, if the authority of the user has the authority of the user a and B, the authority of the user a and B is opened to the user, if the function operation is the authority of the user B, whether the function B has a marked point for acquiring the log is judged, if the mark point is included, the log acquisition is performed according to the marked function authority, if the mark point is not included, the log acquisition is not performed, and the request is directly and normally sent to the log acquisition module for request.
In an embodiment, the information storage module is specifically configured to, after log information is collected, obtain the service pair configured by the current user, the function right, and the collected log information, where the service object includes ID information of the current user. And recording the log information with the brand new function and the collected log information according to a preset log module to generate an operation log, and storing the operation log information to realize real-time monitoring on the change condition, the change time and the service object of the log information.
In an embodiment, the generated operation log information is synchronized to an alarm service, so as to generate visual data corresponding to the specific change condition of the log according to the operation log. When the log information is judged to be abnormal or the log information is judged to be monitored in an error mode in the process of monitoring the operation log, the operation log jumps to an alarm service according to the change time and the service object of the corresponding log information to view the detailed information of the change content of the corresponding log.
In summary, in the log acquisition device provided by the stone, the parameter configuration module configures the function permission of the user function point, the log acquisition module acquires the corresponding log information according to the configured function permission, and the information storage module stores the acquired log information, so that the service manager can monitor the service operation information more clearly.
Based on the same inventive concept of the foregoing embodiments, an embodiment of the present invention provides a log collecting device, as shown in fig. 6, the log collecting device includes: a processor 510 and a memory 511 storing computer programs; the processor 510 illustrated in fig. 6 is not used to refer to the number of the processors 510 as one, but is only used to refer to the position relationship of the processor 510 relative to other devices, and in practical applications, the number of the processors 510 may be one or more; similarly, the memory 511 illustrated in fig. 6 is also used in the same sense, i.e., it is only used to refer to the position relationship of the memory 511 relative to other devices, and in practical applications, the number of the memory 511 may be one or more. The log collection method applied to the above-described apparatus is implemented when the processor 510 runs the computer program.
The apparatus may further comprise: at least one network interface 512. The various components in the device are coupled together by a bus system 513. It will be appreciated that the bus system 513 is used to enable communications among the connections between these components. The bus system 513 includes a power bus, a control bus, and a status signal bus in addition to the data bus. For clarity of illustration, however, the various buses are labeled as bus system 513 in fig. 6.
The memory 511 may be a volatile memory or a nonvolatile memory, or may include both volatile and nonvolatile memories. Among them, the nonvolatile Memory may be a Read Only Memory (ROM), a Programmable Read Only Memory (PROM), an Erasable Programmable Read-Only Memory (EPROM), an Electrically Erasable Programmable Read-Only Memory (EEPROM), a magnetic random access Memory (FRAM), a magnetic random access Memory (Flash Memory), a magnetic surface Memory, an optical Disc, or a Compact Disc Read-Only Memory (CD-ROM); the magnetic surface storage may be disk storage or tape storage. Volatile Memory can be Random Access Memory (RAM), which acts as external cache Memory. By way of illustration and not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), synchronous Static Random Access Memory (SSRAM), dynamic Random Access Memory (DRAM), synchronous Dynamic Random Access Memory (SDRAM), double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM), enhanced Synchronous Dynamic Random Access Memory (ESDRAM), enhanced Synchronous Dynamic Random Access Memory (Enhanced DRAM), synchronous Dynamic Random Access Memory (SLDRAM), direct Memory (DRmb Access), and Random Access Memory (DRAM). The memory 511 described in connection with the embodiments of the invention is intended to comprise, without being limited to, these and any other suitable types of memory.
The memory 511 in the embodiment of the present invention is used to store various types of data to support the operation of the apparatus. Examples of such data include: any computer program for operating on the device, such as operating systems and application programs; contact data; telephone directory data; a message; a picture; video, etc. The operating system includes various system programs, such as a framework layer, a core library layer, a driver layer, and the like, and is used for implementing various basic services and processing hardware-based tasks. The application programs may include various application programs such as a Media Player (Media Player), a Browser (Browser), etc. for implementing various application services. Here, the program that implements the method of the embodiment of the present invention may be included in an application program.
Based on the same inventive concept of the foregoing embodiments, this embodiment further provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, where the computer-readable storage medium may be a magnetic random access Memory (FRAM), a Read Only Memory (ROM), a Programmable Read Only Memory (PROM), an Erasable Programmable Read Only Memory (EPROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Flash Memory (Flash Memory), a magnetic surface Memory, an optical Disc, or a Compact Disc Read Only Memory (CD-ROM), and the like; or a variety of devices, such as mobile phones, computers, tablet devices, personal digital assistants, etc., that include one or any combination of the above memories. When the computer program stored in the computer-readable storage medium is executed by a processor, the log collection method applied to the above-mentioned apparatus is implemented. Please refer to the description of the embodiment shown in fig. 1 for a specific step flow realized when the computer program is executed by the processor, which is not described herein again.
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
As used herein, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, including not only those elements listed, but also other elements not expressly listed.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily think of the changes or substitutions within the technical scope of the present invention, and shall cover the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A log collection method is applied to a SaaS platform and is characterized by comprising the following steps:
acquiring a user authority tree, and judging whether a current user needs to perform functional operation related to the authority of acquiring log information according to the user authority tree;
if the current user needs to perform the function operation related to the authority for acquiring the log information, performing corresponding function parameter configuration;
acquiring corresponding log information according to the function authority corresponding to the configured function parameters;
and storing the acquired log information in a database and synchronizing the log information to an alarm service.
2. The method according to claim 1, wherein if the current user needs to perform a functional operation related to the authority for obtaining log information, performing corresponding functional parameter configuration includes:
if the current user needs to perform related function operation, configuring and storing the function parameters corresponding to the log information acquisition permission, and marking the function point of the current user according to the configured function parameters;
and if the current user does not need to perform related function operation, not configuring the function parameter corresponding to the log information acquisition permission.
3. The method according to claim 1, wherein collecting corresponding log information according to the function authority corresponding to the configured function parameter further comprises:
judging whether the user function point contains a mark point for parameter configuration or not according to the log identifier;
if the user function point comprises a mark point of parameter configuration, determining that the user has performed corresponding function parameter configuration, and acquiring log information of a corresponding function according to the marked function parameter authority;
and if the user function point does not contain the mark point of the parameter configuration, determining that the user does not perform the function parameter configuration, and directly sending an access record to the server without acquiring log information.
4. The method of claim 1, wherein storing the collected log information in a database and synchronizing to an alert service comprises:
acquiring the service object and the function authority configured by the current user and the collected log information; the business object comprises ID information of the current user;
recording the function authority and the collected log information according to a preset log module to generate an operation log, and storing the operation log;
and synchronizing the generated operation log information into an alarm service so as to generate visual data corresponding to the specific change condition of the log according to the operation log.
5. The method of claim 1, further comprising:
monitoring the change condition, the change time and the service object of the log information in real time;
and if the log information is judged to be abnormal or the monitoring is wrong, skipping to an alarm service according to the log change time or the service object to check the detailed information of the log change content.
6. An apparatus for log collection, the apparatus comprising:
the parameter configuration module is used for acquiring a user authority tree and judging whether a current user needs to perform function operation related to the authority of acquiring log information according to the user authority tree; if the current user needs to perform related function operation related to the authority for acquiring the log information, performing corresponding function parameter configuration;
the log acquisition module is used for acquiring corresponding log information according to the function authority corresponding to the configured function parameters;
and the information storage module is used for storing the acquired log information in a database and synchronizing the log information to the alarm service.
7. The apparatus of claim 6, wherein the parameter configuration module is specifically configured to:
acquiring a user authority tree, and judging whether a current user needs to perform functional operation related to the authority of acquiring log information according to the user authority tree;
if the current user needs to perform related function operation, configuring and storing the function parameters corresponding to the log information acquisition permission, and marking the function point of the current user according to the configured function parameters; and if the current user does not need to perform related function operation, not configuring the function parameter corresponding to the log information acquisition permission.
8. The apparatus of claim 6, wherein the log collection module is specifically configured to:
judging whether the user function point contains a mark point of parameter configuration or not according to the log identification;
if the user function point comprises a mark point of parameter configuration, determining that the user has performed corresponding function parameter configuration, and acquiring log information of a corresponding function according to the marked function parameter authority; and if the user function point does not contain the mark point of the parameter configuration, determining that the user does not perform the function parameter configuration, and directly sending an access record to the server without acquiring log information.
9. An electronic device, comprising: a processor and a memory; wherein the memory stores a computer program for being loaded by the processor and for executing the log collection method according to any of claims 1 to 5.
10. A computer-readable storage medium storing instructions for loading by a processor and executing the log collection method of any one of claims 1 to 5.
CN202211608290.9A 2022-12-14 2022-12-14 Log acquisition method and device and computer readable storage medium Pending CN115934468A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211608290.9A CN115934468A (en) 2022-12-14 2022-12-14 Log acquisition method and device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211608290.9A CN115934468A (en) 2022-12-14 2022-12-14 Log acquisition method and device and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN115934468A true CN115934468A (en) 2023-04-07

Family

ID=86557174

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211608290.9A Pending CN115934468A (en) 2022-12-14 2022-12-14 Log acquisition method and device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN115934468A (en)

Similar Documents

Publication Publication Date Title
CN112631913B (en) Method, device, equipment and storage medium for monitoring operation faults of application program
CN112491602B (en) Behavior data monitoring method and device, computer equipment and medium
US20050086231A1 (en) Information archiving software
CN111611021B (en) Log data transmission method, device, computer equipment and storage medium
CN108038039B (en) Method for recording log and micro-service system
CN110088744A (en) A kind of database maintenance method and its system
CN112866319B (en) Log data processing method, system and storage medium
WO2020232883A1 (en) Script defect scanning method and apparatus, computer device and storage medium
CN107241229A (en) A kind of business monitoring method and device based on interface testing instrument
CN114003439B (en) Data backup method, device, equipment and storage medium
CN110063042A (en) A kind of response method and its terminal of database failure
CN111930703A (en) Automatic log file capturing method and device and computer equipment
CN109656825B (en) Method and device for processing art resources, electronic equipment and storage medium
CN115757318A (en) Log query method and device, storage medium and electronic equipment
CN115934468A (en) Log acquisition method and device and computer readable storage medium
CN114500249B (en) Root cause positioning method and device
CN116010244A (en) Automatic test method, device, electronic equipment and storage medium
CN111694724A (en) Testing method and device of distributed table system, electronic equipment and storage medium
CN114416420A (en) Equipment problem feedback method and system
CN113157528B (en) Operation fluctuation monitoring method and device based on big data service cloud
CN115114132A (en) Performance test method and system for auditing program
CN114780412A (en) Page testing method, system, device and medium
JP2002312205A (en) Saving processing method for access log information, saving processing device for the same and processing program for the same
WO2019242112A1 (en) Method and apparatus for obtaining audit field information, computer device, and storage medium
CN118410106B (en) Cross-data source real-time synchronization method based on time line mapping

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