CN111581051A - System operation log processing method, device, equipment and medium based on web front end - Google Patents

System operation log processing method, device, equipment and medium based on web front end Download PDF

Info

Publication number
CN111581051A
CN111581051A CN202010317870.7A CN202010317870A CN111581051A CN 111581051 A CN111581051 A CN 111581051A CN 202010317870 A CN202010317870 A CN 202010317870A CN 111581051 A CN111581051 A CN 111581051A
Authority
CN
China
Prior art keywords
log
database
calling
end database
data
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
CN202010317870.7A
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.)
Shenzhen Genew Technologies Co Ltd
Original Assignee
Shenzhen Genew Technologies 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 Shenzhen Genew Technologies Co Ltd filed Critical Shenzhen Genew Technologies Co Ltd
Priority to CN202010317870.7A priority Critical patent/CN111581051A/en
Publication of CN111581051A publication Critical patent/CN111581051A/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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3089Monitoring arrangements determined by the means or processing involved in sensing the monitored data, e.g. interfaces, connectors, sensors, probes, agents
    • G06F11/3093Configuration details thereof, e.g. installation, enabling, spatial arrangement of the probes

Abstract

The application relates to a method, a device, equipment and a medium for processing system running logs based on a web front end, wherein the method comprises the following steps: creating a front-end database for storing logs and acquiring the logs; packaging the read-write operation of the front-end database; calling a front-end database, and writing log data; inquiring the log, reading the log, calling a front-end database reading method and outputting the log content; and downloading the log, and calling a browser interface to download the log. The invention provides a method for recording and storing the logs in the running process of a system based on a web front-end technology, and by the method, the logs can be quickly called and recorded without depending on a back-end service during development and use, so that the timeliness and the usability are greatly improved; and the realization is easy, and the reliability is high.

Description

System operation log processing method, device, equipment and medium based on web front end
Technical Field
The present application relates to the field of voice communication technologies, and in particular, to a method and an apparatus for processing a system operation log based on a web front end, a computer device, and a readable storage medium.
Background
Generally, the logs used by the front-end of the web in the industry generally leave the support of the back-end service, that is, the back-end service provides the services of log storage and acquisition, downloading and the like to store the data to be monitored by the front-end of the web. When a log based on a back-end service is developed, joint debugging with a back-end programmer is required; when using the logging service, the remote connection to the back-end logging server is necessary to find the data logs belonging to the web front-end storage and download the analysis.
In the prior art, the cost of the whole process is very high from the development of a log server, joint debugging of a front end and a back end of a web to the use, searching and downloading.
Therefore, the prior art is in need of improvement.
Disclosure of Invention
The invention provides a method and a device for processing system running logs based on a web front end, computer equipment and a readable storage medium aiming at the technical problems in the prior art, and provides a method for recording and storing the system running logs based on the web front end technology.
The technical scheme of the invention is as follows:
a method for processing a system running log based on a web front end, wherein the method comprises the following steps:
creating a front-end database for storing logs and acquiring the logs;
packaging the read-write operation of the front-end database;
calling a front-end database, and writing log data;
inquiring the log, reading the log, calling a front-end database reading method and outputting the log content;
and downloading the log, and calling a browser interface to download the log.
The method for processing the system running log based on the web front end comprises the following steps of establishing a front end database for storing the log and acquiring the log:
opening and creating a front-end database, and storing through a front-end index database;
a front-end database is created that stores the log and retrieves the log.
The method for processing the system running log based on the web front end comprises the following steps of calling a front end database and writing log data:
and performing log recording operation by adopting a writing function of the front-end database.
The method for processing the system running log based on the web front end comprises the following steps of calling a front end database and writing log data:
when the log needs to be recorded, a log () method is used for running a code at the front end to receive a value parameter;
obtaining system time when a log () method is called;
and calling the created front-end database to write log data.
The method for processing the system running log based on the web front end comprises the following steps of inquiring the log, reading the log, calling a front-end database reading method and outputting the log content:
when the on-line front-end system has a problem and needs to query the log, the printLogByTime (date) is called to acquire the log content;
resolving the Date object to a Date accurate to an hour;
and using the analyzed date accurate to the hour as an index to inquire whether log data recorded in the hour exist in a front-end database, reading the log data if the log data exists, and controlling the log data to be printed in a console.
The method for processing the system running log based on the web front end comprises the following steps of inquiring the log, reading the log, calling a front-end database reading method and outputting the log content:
analyzing the starting time and the ending time input by the user and solving that the data needing to be acquired for n hours needs to be acquired;
calculating the time from the starting time to n hours hour by hour, and reading log information from a front-end database by taking the n hour as an index;
and splicing the n-hour logs into a log, and printing the log on a console.
The method for processing the system running log based on the web front end comprises the following steps of downloading the log and calling a browser interface to download the log:
appointing the name of the download log and the format of the download log;
and writing the specified download log through a binary data storage Blob object built in the browser, and downloading by using codes.
A system running log processing device based on a web front end comprises:
the database creating module is used for creating a front-end database for storing the log and acquiring the log;
the packaging module is used for packaging the read-write operation of the front-end database;
the calling module is used for calling the front-end database and writing log data into the front-end database;
the query module is used for controlling the query log, reading the log and calling a front-end database reading method to output the log content;
and the downloading module is used for controlling the log downloading and calling the browser interface to download the log.
A computer device, comprising: the system comprises a memory and a processor, wherein the memory stores a computer program, and the processor realizes the steps of any one of the web front end based system running log processing methods when executing the computer program.
A computer readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of any of the web front end based system execution log processing methods.
Compared with the prior art, the embodiment of the invention has the following advantages:
a method and a device for processing system running logs based on a web front end, computer equipment and a readable storage medium are provided, wherein the method comprises the following steps: creating a front-end database for storing logs and acquiring the logs; packaging the read-write operation of the front-end database; calling a front-end database, and writing log data; inquiring the log, reading the log, calling a front-end database reading method and outputting the log content; and downloading the log, and calling a browser interface to download the log. The invention provides a method for recording and storing the logs in the running process of a system based on a web front-end technology, and by the method, the logs can be quickly called and recorded without depending on a back-end service during development and use, so that the timeliness and the usability are greatly improved; and the realization is easy, and the reliability is high.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flow chart of a method for processing a system operation log based on a web front end according to the present invention.
Fig. 2 is a schematic diagram of a screenshot of a specified download log file of a system operation log processing method based on a web front end according to an embodiment of the present invention.
Fig. 3 is a schematic diagram of an internal screenshot of a specified download log file of a system operation log processing method based on a web front end according to an embodiment of the present invention.
Fig. 4 is a schematic structural diagram of a system operation log processing apparatus based on a web front end in an embodiment of the present invention.
Fig. 5 is an internal structural diagram of a computer device in an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The inventor finds that the cost of the whole process is very high from the development of a log server, joint debugging of a front end and a back end of a web to the use, searching and downloading in the prior art.
In order to solve the above problems, various non-limiting embodiments of the present invention will be described in detail below with reference to the accompanying drawings in the embodiments of the present invention.
The inventor researches and discovers that when a front-end programmer locates front-end program problems, the front-end programmer does not necessarily rely on back-end services, and all functions sufficient for production, storage, acquisition and downloading are provided in a technical stack of the front-end programmer. If the log system runs at the front end of the web completely, the log system does not need to rely on back-end service during development and use, records are quickly called, and the timeliness and the usability are greatly improved.
Referring to fig. 1, fig. 1 shows a method for processing a system running log based on a web front end according to an embodiment of the present invention, where the method includes the following steps;
step S10: creating a front-end database for storing logs and acquiring the logs;
in the present invention, a technique called a front-end index database (indexedDB) at the front end of the web is employed. The technology of the front-end index database (indexedDB) provides a service for persisting and reading mass data under the browser environment, directly stores mass data on a hard disk to simulate the behavior of the rear-end database, does not generate any network overhead, and is particularly suitable for storing mass data directly produced by a front end or uploaded by a user.
The specific mode of the invention is to use a front-end index database (indexedDB) for storage.
Use the code var request ═ window.
The front-end database is opened and created, the databaseName is the name of the database, and if the specified database does not exist, the database is newly created. If the database version is omitted, the default is the current version when the existing database is opened; when a database is newly built, the default is 1. Taking the databaseName as the name of 'new databank database' as an example, opening and creating a new databank; a front-end database is created that stores the log and retrieves the log.
In the invention, how to create a front-end database for storing and acquiring the log is specifically; in particular to
The name of the database name as 'new database' is used as an example to illustrate how to create a front-end database storing logs and obtaining logs.
First, the code var request is used, window. The database is opened and created. If the designated database does not exist, the database is newly built. The second parameter is that if the database version is omitted, the default is the current version when the existing database is opened; when a database is newly built, the default is 1.
Second, the window. indexeddb. open () method returns a request object. The object processes the operation result of opening the database through an error onerror event and a success onsucess event. Where the onerror event indicates a failure to open the database. The onsuccess event indicates a successful database opening. If successful, then the act of creating a 'new database' is successful, with the ability to store write logs and retrieve logs.
If the success event is entered, the success notification information can be obtained by using the onsucess event callback code of the request object:
request.onsuccess=function(event){
log ('database creation and open success');
};
if an error failure event is entered, the failure notification information can be acquired by using the onerror event callback code of the request object:
request.onsuccess=function(event){
log ('database creation failure');
};
if the operation fails, the user can be prompted or the database can be re-created and opened, and if the operation succeeds, the data writing and reading functions are achieved.
The method has the advantages that the operation of opening and creating the front-end database is realized by the codes, and an implementation basis is provided for storage writing and reading of subsequent log data.
Step S20: packaging the read-write operation of the front-end database;
in the present invention, how to "encapsulate read-write operation of front-end database" specifically includes the following steps:
taking the write operation as an example: first, function and method parameters that actually implement database read and write operations are listed, and the code that handles callback events will have approximately 12 rows or so.
Second, a new function is created, named add () function, to represent the write data operation. It receives a data parameter as the data that the user needs to input, and will internally handle the actual write operation.
Thirdly, in the add () function, all the codes involved in the database write operation are implemented, and finally a Promise object (a specification of a browser implementation scripting language) of the ES standard is returned, which is released when the callback function returns data successfully or unsuccessfully.
The operation at the code end is add ('data'). then (event) }
The latter function of using the write database can be implemented with only one line of code.
The advantage of encapsulating the read-write operation of the front-end database in the invention is that the operation of opening and creating the database is performed only after monitoring through the success and failure callback function, and there is a possibility of failure. This can be difficult to implement in the service code (write and get log function). Not only the lengthy codes for database creation and event processing need to be written directly, but also the service codes need to be inserted into the callback function events for success and failure in processing. So for development convenience and to enhance reusability (if other items need to be used, they can be directly used, not duplicated again), the database opening and creating operations are encapsulated as a function, and success and failure events are packaged as a Promise object (a model dedicated to handling asynchronous events) based on the ES standard. Then only one line of code is needed to call the function of the opening and creation database when in use, and the line of business processing in the line of code can complete the opening and creation of the database. Without paying attention to the complex functions, parameters and different callback functions actually created inside it.
Similarly, the encapsulation of the read-write operation also encounters the events of success and failure and the respective functions, and then they are simplified by encapsulating in the same way, the add () function represents the insert data function, the read () function represents the read data function, and only add ("write data"). then (event) { 'business operation' } is used for writing data and the subsequent event processing operation when writing data, which not only shields the complex write data concrete implementation code, but also simplifies the trouble of processing the call-back function, and one line of code is determined, and the read data is the same, which greatly facilitates the writing of the subsequent business code. .
Step S30: calling a front-end database, and writing log data;
in the step, the actual operation of the log record is directly carried out by using the writing function of the front-end database.
Specifically, first, when logging is required, the code is run at the front end using a log (value) method that receives a value parameter, which is essentially pure string log content, e.g. 'variable color exception, with a value of 0 xfffff', and then does two things.
The first is to obtain the specific time of the system when calling the log () method, and the time is accurate to hours. For example '2020-4-815: 00'
And secondly, calling the front-end database created in the previous step for writing the log data.
Since the data writing of the front-end database is performed in the form of key-value pairs, one log record is, for example, indexed by time (e.g., '2020-04-0815: 00') (key), and data to be stored is indexed by value (value), e.g., 'variable color exception, value 0 xfffff').
In the previous step, a database object request is newly created, using the code
var db
request.onsuccess=function(event){
var db=request.result;
};
And acquiring a database instance object db, and writing data by using the db.
In particular, a transaction (the transaction refers to an operation which is carried out in the database system and occupies resources, and the increase of the transaction is the capability of supervising the data addition, deletion, modification and inspection and managing the data safety in real time of the database system). The new build must specify the table name and mode of operation ("read-only" or "read-write"). After a new transaction is created, the object store (name) method is used to take the database storage object, and a record is written into the table by the add () method of the table object, wherein the specific reference code is as follows
var request=db.transaction(['person'],'readwrite')
.objectStore(‘log’)
Add ({ time: '2020-04-0815: 00', value: 'variable color exception, value 0 xfffff' });
and then, using an onsuccess success callback function to acquire a message that data is successfully added.
request.onsuccess=function(event){
Log ('data write successful');
};
and acquiring a message of data newly-adding failure by using the onerror failure callback function.
request.onerror=function(event){
Log ('data write failure');
}
thus, a piece of log data is successfully written to the front-end database. The index (key) of the log data is '2020-4-815: 00', the content (value) is a 'variable color exception, with a value of 0 xfffffff'.
Step S40, inquiring the log, reading the log and calling a front-end database reading method to output the log content;
the above steps complete the logging, i.e. a piece of content log information is recorded at a time point accurate to the hour.
The record is to be able to read the query or download the query for use when needed. When the on-line front-end system has problems and needs to query the log, a printlogbytime (date) method is called to acquire the log content. The method supports the input of a parameter Date (time object Date in the front-end script language, which represents a specific Date accurate to milliseconds), and the method of the present invention can do two things.
The first is that the method internally resolves the Date object to a Date accurate to hours, for example, '2020-4-815: 00'
The second method is that the analyzed date which is accurate to the hour is used as an index (key) to inquire whether log data which is recorded in the hour exists in a front-end database, if so, the log data is read out and printed out on a console.
If logs are needed for a continuous period of time, such as n hours or even days, then the printLogByAPT (start time: Date, end time: Date) method needs to be called. The method receives two parameters, a start time range and an end time range for obtaining the log, for example, ' 2020-4-715: 00 ' and ' 2020-4-815:00 ' require obtaining log data representing 15:00 from 7/2020/4/2020/8, e.g. 15 o ' clock 24 hours.
The method of the invention has three internal operations.
Firstly, analyzing the starting time and the ending time input by a user in the method to solve the problem that n hours of data are required to be acquired;
secondly, the time from the starting time to n hours is calculated hour by hour inside the method, and the time is used as an index (key) to read the log information from a front-end database;
thirdly, the n-hour logs are spliced into a larger log in the method and printed on the console.
The reading operation program of the specific front-end database is completed by using things, and the index (key) is used for inquiring by using the date which is written in advance and is accurate to the hour.
The method has the advantages that the recorded logs are printed through the appointed date or date range, the logs with the accuracy of hour and date are read from the front-end database, the method is completely independent of any back-end service support, and the more core log query function of the method is realized.
Step S50, downloading the log, and calling a browser interface to download the log;
based on the above steps, the log can be downloaded quickly.
Firstly, the printLogByAPT (start time: Date, end time: Date) method in the above steps acquires log data in an actual time period and splices the log data into a larger log, and a downloading function is performed on the basis. A downLoadLogByAPT (start time: Date, end time: Date) method is designed, and parameters received by the method are consistent with the printLogByAPT (start time: Date, end time: Date) method and are both the log starting recording time and the log ending recording time. After finishing the log content spliced by the printLogByAPT (start time: Date, end time: Date) method, the method does not perform printing but performs downloading operation, and comprises the following specific steps:
firstly, specifying the name of a download log, namely ' starting time-ending time ', and specifying the format of the download log as ' data: text/plane; charset ═ utf-8, "meaning plain text data encoded in utf-8
Secondly, writing the specified download log by using a binary data storage Blob object built in the browser, and downloading by using codes
window navigator mssavebob (specifies the download log file, the name of the log);
after execution, the downloading is completed, and the screenshot of the result is shown in fig. 2 and fig. 3;
the method has the advantages that the log downloading function is added on the basis of log printing, the log obtaining means in front-end operation is added, the downloaded log can be further stored and transmitted in a file form instead of being only limited to be checked in the current operation environment console, and information transmission is facilitated.
In a further embodiment, the present invention provides a method for recording and storing a system runtime log based on a web front-end technology, which may further include the following steps:
analyzing the positioning problem of the log content after the downloading or writing is finished;
the invention can analyze the downloaded or written log to the content positioning problem.
In the invention, the system operation can continuously write new logs.
Therefore, the invention provides a method for recording and storing the logs during the operation of the system based on the web front-end technology, and by the method, the logs can be quickly called and recorded without relying on back-end service during development and use, so that the timeliness and the usability are greatly improved.
In an embodiment, an embodiment of the present invention further provides a system running log processing apparatus based on a web front end, as shown in fig. 4, where the apparatus includes:
a database creating module 41, configured to create a front-end database for storing the log and acquiring the log;
the encapsulation module 42 is used for encapsulating the read-write operation of the front-end database;
a calling module 43, configured to call a front-end database, and write log data into the front-end database;
the query module 44 is used for controlling query logs, reading the logs and calling a front-end database reading method to output log contents;
and the downloading module 45 is configured to control downloading of the log, and call a browser interface to download the log, as described above.
In one embodiment, the present invention provides a computer device, which may be a terminal, having an internal structure as shown in fig. 5. The computer device includes a processor, a memory, a network interface, a display screen, and an input system connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a method of generating a natural language model. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input system of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that fig. 5 is a block diagram of only a portion of the structure associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
The embodiment of the invention provides computer equipment, which comprises a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to realize the following steps:
creating a front-end database for storing logs and acquiring the logs;
packaging the read-write operation of the front-end database;
calling a front-end database, and writing log data;
inquiring the log, reading the log, calling a front-end database reading method and outputting the log content;
and downloading the log, and calling a browser interface to download the log.
The step of creating a front-end database for storing and acquiring the log comprises:
opening and creating a front-end database, and storing through a front-end index database;
a front-end database is created that stores the log and retrieves the log.
The step of calling the front-end database and writing the log data comprises the following steps:
and performing log recording operation by adopting a writing function of the front-end database.
The step of calling the front-end database and writing the log data comprises the following steps:
when the log needs to be recorded, a log () method is used for running a code at the front end to receive a value parameter;
obtaining system time when a log () method is called;
and calling the created front-end database to write log data.
The steps of querying the log, reading the log and calling a front-end database reading method to output the log content comprise:
when the on-line front-end system has a problem and needs to query the log, the printLogByTime (date) is called to acquire the log content;
resolving the Date object to a Date accurate to an hour;
and using the analyzed date accurate to the hour as an index to inquire whether log data recorded in the hour exist in a front-end database, reading the log data if the log data exists, and controlling the log data to be printed in a console.
The steps of querying the log, reading the log and calling a front-end database reading method to output the log content comprise:
analyzing the starting time and the ending time input by the user and solving that the data needing to be acquired for n hours needs to be acquired;
calculating the time from the starting time to n hours hour by hour, and reading log information from a front-end database by taking the n hour as an index;
and splicing the n-hour logs into a log, and printing the log on a console.
The log downloading step of calling a browser interface to download the log comprises the following steps:
appointing the name of the download log and the format of the download log;
writing the appointed download log through a binary data storage Blob object built in the browser, and downloading by using a code; as described above.
In summary, compared with the prior art, the embodiment of the invention has the following advantages:
the invention provides a method and a device for processing a system running log based on a web front end, computer equipment and a readable storage medium, wherein the method comprises the following steps: creating a front-end database for storing logs and acquiring the logs; packaging the read-write operation of the front-end database; calling a front-end database, and writing log data; inquiring the log, reading the log, calling a front-end database reading method and outputting the log content; and downloading the log, and calling a browser interface to download the log. The invention provides a method for recording and storing the logs in the running process of a system based on a web front-end technology, and by the method, the logs can be quickly called and recorded without depending on a back-end service during development and use, so that the timeliness and the usability are greatly improved; and the realization is easy, and the reliability is high.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A system running log processing method based on a web front end is characterized by comprising the following steps:
creating a front-end database for storing logs and acquiring the logs;
packaging the read-write operation of the front-end database;
calling a front-end database, and writing log data;
inquiring the log, reading the log, calling a front-end database reading method and outputting the log content;
and downloading the log, and calling a browser interface to download the log.
2. The method for processing the running log of the system based on the web front end as claimed in claim 1, wherein the step of creating the front end database for storing the log and obtaining the log comprises:
opening and creating a front-end database, and storing through a front-end index database;
a front-end database is created that stores the log and retrieves the log.
3. The method for processing the running log of the system based on the web front end as claimed in claim 1, wherein the step of calling the front end database and writing the log data comprises:
and performing log recording operation by adopting a writing function of the front-end database.
4. The method for processing the running log of the system based on the web front end as claimed in claim 1, wherein the step of calling the front end database and writing the log data comprises:
when the log needs to be recorded, a log () method is used for running a code at the front end to receive a value parameter;
obtaining system time when a log () method is called;
and calling the created front-end database to write log data.
5. The method for processing the running log of the system based on the web front end as claimed in claim 1, wherein the step of querying the log and reading the log calls a front end database reading method to output the log content comprises:
when the on-line front-end system has a problem and needs to query the log, the printLogByTime (date) is called to acquire the log content;
resolving the Date object to a Date accurate to an hour;
and using the analyzed date accurate to the hour as an index to inquire whether log data recorded in the hour exist in a front-end database, reading the log data if the log data exists, and controlling the log data to be printed in a console.
6. The method for processing the running log of the system based on the web front end as claimed in claim 1, wherein the step of querying the log and reading the log calls a front end database reading method to output the log content comprises:
analyzing the starting time and the ending time input by the user and solving that the data needing to be acquired for n hours needs to be acquired;
calculating the time from the starting time to n hours hour by hour, and reading log information from a front-end database by taking the n hour as an index;
and splicing the n-hour logs into a log, and printing the log on a console.
7. The method for processing the system running log based on the web front end according to claim 1, wherein the step of downloading the log and calling a browser interface to download the log comprises:
appointing the name of the download log and the format of the download log;
and writing the specified download log through a binary data storage Blob object built in the browser, and downloading by using codes.
8. A system operation log processing device based on a web front end, comprising:
the database creating module is used for creating a front-end database for storing the log and acquiring the log;
the packaging module is used for packaging the read-write operation of the front-end database;
the calling module is used for calling the front-end database and writing log data into the front-end database;
the query module is used for controlling the query log, reading the log and calling a front-end database reading method to output the log content;
and the downloading module is used for controlling the log downloading and calling the browser interface to download the log.
9. A computer device, comprising: a memory and a processor, the memory storing computer programs, wherein the processor when executing the computer programs implements the steps of the method for processing the running log of the system based on the web front end according to any one of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the steps of the web front-end based system execution log processing method according to any one of claims 1 to 7.
CN202010317870.7A 2020-04-21 2020-04-21 System operation log processing method, device, equipment and medium based on web front end Pending CN111581051A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010317870.7A CN111581051A (en) 2020-04-21 2020-04-21 System operation log processing method, device, equipment and medium based on web front end

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010317870.7A CN111581051A (en) 2020-04-21 2020-04-21 System operation log processing method, device, equipment and medium based on web front end

Publications (1)

Publication Number Publication Date
CN111581051A true CN111581051A (en) 2020-08-25

Family

ID=72126710

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010317870.7A Pending CN111581051A (en) 2020-04-21 2020-04-21 System operation log processing method, device, equipment and medium based on web front end

Country Status (1)

Country Link
CN (1) CN111581051A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112685487A (en) * 2021-01-15 2021-04-20 金现代信息产业股份有限公司 Method and apparatus for simulating relational database through IndexDB in browser environment
CN113032355A (en) * 2021-04-06 2021-06-25 上海英方软件股份有限公司 Method and device for collecting logs in batches by Web application

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107291615A (en) * 2017-05-19 2017-10-24 北京北信源软件股份有限公司 A kind of WEB front-end log-output method and device
CN109471773A (en) * 2018-10-31 2019-03-15 武汉斗鱼网络科技有限公司 A kind of method, apparatus, server and the storage medium of the output of front end log multichannel
CN110413917A (en) * 2019-08-01 2019-11-05 山东浪潮通软信息科技有限公司 A method of realizing web report data caching

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107291615A (en) * 2017-05-19 2017-10-24 北京北信源软件股份有限公司 A kind of WEB front-end log-output method and device
CN109471773A (en) * 2018-10-31 2019-03-15 武汉斗鱼网络科技有限公司 A kind of method, apparatus, server and the storage medium of the output of front end log multichannel
CN110413917A (en) * 2019-08-01 2019-11-05 山东浪潮通软信息科技有限公司 A method of realizing web report data caching

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112685487A (en) * 2021-01-15 2021-04-20 金现代信息产业股份有限公司 Method and apparatus for simulating relational database through IndexDB in browser environment
CN113032355A (en) * 2021-04-06 2021-06-25 上海英方软件股份有限公司 Method and device for collecting logs in batches by Web application

Similar Documents

Publication Publication Date Title
CN108319547B (en) Test case generation method, device and system
CN105786998B (en) Database middleware system and the method for handling data using it
CN112486786B (en) Calling link tracking method and device
KR20060046326A (en) Smart ui recording and playback framework
CN110716853A (en) Test script recording method, application program testing method and related device
CN110362490B (en) Automatic testing method and system for integrating iOS and Android mobile applications
CN111581051A (en) System operation log processing method, device, equipment and medium based on web front end
CN112394942A (en) Distributed software development compiling method and software development platform based on cloud computing
CN115080398A (en) Automatic interface test system and method
CN115658529A (en) Automatic testing method for user page and related equipment
CN116841865A (en) Visual test method and device, electronic equipment and storage medium
US20070092069A1 (en) Method and system for testing enterprise applications
CN113836014A (en) Interface testing method and device, electronic equipment and storage medium
CN110888641B (en) Script automatic generation method and device, server and storage medium
CN111078529B (en) Client writing module testing method and device and electronic equipment
CN112241625A (en) Method and system for automatically generating contract document based on java language
CN111258802A (en) Method for capturing application program crash information and related equipment
CN110837467A (en) Software testing method, device and system
CN115757014A (en) Power consumption testing method and device
CN115599361A (en) Software development method, device, equipment and medium
CN111858302B (en) Method and device for testing small program, electronic equipment and storage medium
CN113901025A (en) Database management method, device, equipment and storage medium
CN113504904A (en) User-defined function implementation method and device, computer equipment and storage medium
CN114546480B (en) Code automatic integration method, device and readable storage medium
CN115576858B (en) Business action execution system for low-code front-end application and readable storage medium

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