CN109491979A - Report method, device, computer equipment and the storage medium of log information - Google Patents
Report method, device, computer equipment and the storage medium of log information Download PDFInfo
- Publication number
- CN109491979A CN109491979A CN201811389705.1A CN201811389705A CN109491979A CN 109491979 A CN109491979 A CN 109491979A CN 201811389705 A CN201811389705 A CN 201811389705A CN 109491979 A CN109491979 A CN 109491979A
- Authority
- CN
- China
- Prior art keywords
- log information
- log
- web
- default
- information
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F1/00—Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
- G06F1/26—Power supply means, e.g. regulation thereof
- G06F1/32—Means for saving power
- G06F1/3203—Power management, i.e. event-based initiation of a power-saving mode
- G06F1/3234—Power saving characterised by the action undertaken
- G06F1/3243—Power saving in microcontroller unit
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/4401—Bootstrapping
- G06F9/4418—Suspend and resume; Hibernate and awake
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/546—Message passing systems or structures, e.g. queues
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Debugging And Monitoring (AREA)
Abstract
The embodiment of the present application discloses report method, device, computer equipment and the storage medium of a kind of log information.This method includes obtaining Web to apply corresponding log information;By the default script that uploads by log information write-in memory queue, wherein the default upload script is run using Web Worker separate threads;Judge whether the quantity of the log information in the memory queue is greater than preset quantity;And if the quantity of the log information in the memory queue is greater than the preset quantity, and the log information in the memory queue is reported to server.This method can realize reporting for log information in the case where being not take up page main thread resource.
Description
Technical field
This application involves field of computer technology more particularly to a kind of report method of log information, device, computer to set
Standby and storage medium.
Background technique
Log information applies Web, especially SPA (full name in English: Single Page Web Application, in
Literary fame claims: single page Web application) for it is particularly important.Currently, after generating log information, need newly-built URI (full name in English:
Uniform Resource Identifier, Chinese: uniform resource identifier) request, wherein it is carried in URI request
Then log information requests to report to server to complete log by sending URI.
However, the problems such as URI request reports the page main thread resource for needing to occupy SPA, be easy to cause page Caton, especially
It is when the frequency that reports of URI request increases or log information is larger, and the problem of page Caton is even more serious.In addition to this,
In such a way that URI request reports log, it is also be easy to cause the loss of log information, for example, sends URI in terminal to server
After request, if suspension occurs in terminal, then URI request can not just accurately arrive at server, lead to this partial log information
It loses.
Therefore, it is necessary to a kind of report method of log information be provided, to solve the above problems.
Summary of the invention
This application provides a kind of report method of log information, device, computer equipment and storage medium, to avoid
The problem of page Caton caused by occupying page main thread resource of giving the correct time on progress log information.
In a first aspect, this application provides a kind of report methods of log information comprising:
It obtains Web and applies corresponding log information;
By the default script that uploads by log information write-in memory queue, wherein the default upload script uses
The operation of Web Worker separate threads;
Judge whether the quantity of the log information in the memory queue is greater than preset quantity;And
If the quantity of the log information in the memory queue is greater than the preset quantity, by the day in the memory queue
Will information reporting is to server.
Second aspect, this application provides a kind of reporting devices of log information comprising:
Log acquisition unit, for obtaining Web using corresponding log information;
Log writing unit, for memory queue to be written in the log information by default upload script, wherein described
The default script that uploads is run using Web Worker separate threads;
Quantity judging unit, for judging whether the quantity of the log information in the memory queue is greater than preset quantity;
And
Reporting unit will be described if the quantity for the log information in the memory queue is greater than the preset quantity
Log information in memory queue reports to server.
The third aspect, the application provide a kind of computer equipment again, including memory, processor and are stored in described deposit
On reservoir and the computer program that can run on the processor, the processor realizes the when executing the computer program
On the one hand the report method of the log information provided.
Fourth aspect, present invention also provides a kind of computer readable storage mediums, wherein the computer-readable storage
Media storage has computer program, and the computer program when being executed by a processor mentions the processor execution first aspect
The report method of the log information of confession.
The application provides report method, device, computer equipment and the storage medium of a kind of log information.This method can be with
It realizes when reporting log information to server, the main thread resource of Web application page is not take up, to avoid page Caton
Problem occurs.
Detailed description of the invention
Technical solution in ord to more clearly illustrate embodiments of the present application, below will be to needed in embodiment description
Attached drawing is briefly described, it should be apparent that, the accompanying drawings in the following description is some embodiments of the present application, general for this field
For logical technical staff, without creative efforts, it is also possible to obtain other drawings based on these drawings.
Fig. 1 is a kind of schematic flow diagram of the report method of log information provided by the embodiments of the present application;
Fig. 2 is a kind of specific schematic flow diagram of the report method of log information provided by the embodiments of the present application;
Fig. 3 is a kind of another schematic flow diagram of the report method of log information provided by the embodiments of the present application;
Fig. 4 is a kind of schematic block diagram of the reporting device of log information provided by the embodiments of the present application;
Fig. 5 is a kind of another schematic block diagram of the reporting device of log information provided by the embodiments of the present application;
Fig. 6 is a kind of schematic block diagram of computer equipment provided by the embodiments of the present application.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present application, technical solutions in the embodiments of the present application carries out clear, complete
Site preparation description, it is clear that described embodiment is some embodiments of the present application, instead of all the embodiments.Based on this Shen
Please in embodiment, every other implementation obtained by those of ordinary skill in the art without making creative efforts
Example, shall fall in the protection scope of this application.
It should be appreciated that ought use in this specification and in the appended claims, term " includes " and "comprising" instruction
Described feature, entirety, step, operation, the presence of element and/or component, but one or more of the other feature, whole is not precluded
Body, step, operation, the presence or addition of element, component and/or its set.
It is also understood that mesh of the term used in this present specification merely for the sake of description specific embodiment
And be not intended to limit the application.As present specification and it is used in the attached claims, unless on
Other situations are hereafter clearly indicated, otherwise " one " of singular, "one" and "the" are intended to include plural form.
It will be further appreciated that the term "and/or" used in present specification and the appended claims is
Refer to any combination and all possible combinations of one or more of associated item listed, and including these combinations.
Referring to Fig. 1, Fig. 1 is a kind of schematic flow diagram of the report method of log information provided by the embodiments of the present application.
The report method of the log information is applied in terminal.The terminal may be, for example, mobile phone, tablet computer, desktop computer, hand-held electric
The electronic equipments such as brain.As shown in Figure 1, the report method of the log information includes step S101~S104.
S101, Web is obtained using corresponding log information.
In the present embodiment, in order to can capture the log information that Web is applied, the logic applied in Web is needed to call
The program for capturing log information is inserted into hierarchical process, which is known as default log output
Program.
In general, Web is applied in loading page, needs to load HTML (full name in English: HyperText Markup
Language), CSS (full name in English: Cascading Style Sheets) and JS (full name in English: JavaScript).Adding
After having carried above- mentioned information, Web application can normally show the page, but can not interact with user, and for example, user clicks Web
When application page, Web is using no response.In order to which the interaction with user may be implemented, Web application needs to enter logic and calls rank
Section, the logic call the stage to call hierarchical process to realize the interaction with user by operation logic.Therefore, it can be called in logic
Default log output program is added in the important node of hierarchical process, for example, calls the foremost of hierarchical process to be added in logic
The default log output program of a part, to run default log output program when entering logic and calling the stage, meanwhile, in logic
In the multiple important nodes for calling hierarchical process, default log output program accordingly is added, to export each important node
Log information.
Therefore, in the present embodiment, obtain Web and apply corresponding log information, specifically include: by running default log
Output program obtains Web and applies corresponding log information, wherein the default log output program is the logic applied in Web
Call the program for being used to capture log information being inserted into hierarchical process.
Specifically, in one embodiment, log information may include each processing stage of current page in Web application
Temporal information.Wherein, which may include the temporal informations such as the render time of the page, network request time.In order to catch
The temporal information is obtained, Web is obtained using corresponding log information by running default log output program, specifically includes: passing through
It runs the Performance.timing () method in default log output program and obtains each of current page in Web application
The temporal information of processing stage is as log information.
Specifically, in one embodiment, which may include the error information of Web application, wherein the letter that reports an error
Breath may include that browser reports an error and grammer such as reports an error at the information.Therefore, error information is arrived in order to available, it is default by running
Log output program obtains Web and applies corresponding log information, specifically includes: by running in default log output program
Try { } Catch { } or Window.onerror () method obtain the error information of Web application as log information.
It should be noted that log information can include above-mentioned temporal information and error information, in addition to this, day simultaneously
Will information can also include other information, be not particularly limited herein.It is inserted by being called in hierarchical process in the logic that Web is applied
Enter default log output program, can capture Web application more fully log information, improve the integrity degree of log information.
S102, the log information is written by memory queue by default upload script, wherein the default upload script
It is run using Web Worker separate threads.
In the present embodiment, which is the foot that the carrying write in advance uploads the logical code of log information
This.Specifically, as shown in Fig. 2, Fig. 2 is a kind of specific signal stream of report method of log information provided by the embodiments of the present application
Cheng Tu.Step S102 specifically includes step S1021 and S1022.
S1021, script is uploaded by the way that the operation of Web Worker separate threads is default, and passes through PostMessage () method
Receive the log information of Web application page transmitting.
S1022, the log information is written in memory queue.
Default upload script is run by Web Worker separate threads, Web Worker passes through Web application page
PostMessage () method is communicated with Web application page, to receive the log information of Web application page transmitting.
After receiving log information, log information is written into memory queue Web Worker, and executes step S103.
S103, judge whether the quantity of the log information in the memory queue is greater than preset quantity.
In order to reduce terminal to the access times of server, that is, the number of log information is uploaded, the access of server is reduced
Pressure needs to judge whether the quantity of the log information in memory queue is greater than preset quantity in the present embodiment.Wherein, should
Preset quantity can be configured according to actual needs, for example, can be set to 1000.
If judging the quantity of the log information in memory queue no more than preset quantity, at this time without uploading log letter
The operation of breath.
If judging, the quantity of the log information in memory queue is greater than preset quantity, illustrates the log letter in memory queue
Breath quantity has reached the condition of upload, will execute step S104 at this time.
If the quantity of S104, log information in the memory queue is greater than the preset quantity, by the memory queue
In log information report to server.
When the quantity of the log information in memory queue is more than preset quantity, Web Worker is by the day in memory queue
Will information reporting is to server, so that completes log information reports operation.The report method of the log information can pass through Web
Worker separate threads report log information, are not take up the main thread resource of Web application page, avoid because to main thread resource
The problem of occupying and causing Caton to Web application page.
In one embodiment, as shown in figure 3, Fig. 3 is a kind of report method of log information provided by the embodiments of the present application
Another schematic flow diagram.In this embodiment, this method further includes step S105 to S106.
Step S105, judge whether network is in connection status.
Before the log information in the memory queue is reported to server, i.e., memory team is judged in step S103
When the quantity of log information in column is greater than preset quantity, also need further to judge whether network is in connection status.If network
In connection status, step S104 will be executed, that is, executes the step that the log information in the memory queue is reported to server
Suddenly.If network is not in connection status, that is, network is in suspension state, will execute step S106 at this time.
S106, the preservation log information to local memory, and again when monitoring the network and being in connection status
Report the log information to the server.
When step S105 judges that network is in suspension state, log information is stored in local memory by Web Worker
In, while the state of regular monitoring network reads log letter when monitoring network and being in connection status from local memory
Breath, and log information is uploaded to server again.In this way it is possible to prevente effectively from the loss of log information, so that log reported
Stability is stronger.
Further, in one embodiment, as shown in figure 3, this method further includes step S107 and S108.
S107, judge whether to receive the feedback information that the server is sent.
If S108, not receiving the feedback information that the server is sent, save in the log information to the local
It deposits.
In this embodiment, after the log information in memory queue is reported to server, i.e., after step 104,
Also need to judge whether to receive the feedback information of server transmission.If server receives log information, server can be to
Terminal sends feedback information, and terminal can receive feedback information at this time, and process terminates.If server does not receive log information,
For example, during sending log information to server, there is situations such as suspension, then terminal would not receive feedback
Information needs for log information to be stored in local memory at this time.
In order to which the upload of log information may be implemented, can be spaced after log information is stored in local memory
After predetermined time period, log information is uploaded again, until log information is successfully uploaded to server, to avoid day
The loss of will information guarantees that log information can be successfully stored in server.
In the present embodiment, reporting for log information is realized by Web Worker separate threads, be not take up Web applications pages
The main thread resource in face, thus the problem of avoiding Web application page Caton.Meanwhile this method can be by render time, net
The various informations such as network request time, error information report to server, so that the log information reported is more comprehensive, raising is reported
Log information integrity degree.
The embodiment of the present application also provides a kind of reporting device of log information, and the reporting device of the log information is for executing
The report method of any one of aforementioned log information.Specifically, referring to Fig. 4, Fig. 4 is a kind of log provided by the embodiments of the present application
The schematic block diagram of the reporting device of information.The reporting device 300 of log information can be installed in terminal, for example, the terminal
It can be the equipment such as mobile phone, tablet computer, laptop computer, desktop computer.
As shown in figure 4, the reporting device 300 of log information includes log acquisition unit 301, log writing unit 302, number
Measure judging unit 303 and reporting unit 304.
Log acquisition unit 301, for obtaining Web using corresponding log information.
Specifically, in one embodiment, log acquisition unit 301, is specifically used for: by running default log output program
It obtains Web and applies corresponding log information, wherein the default log output program is that the logic applied in Web calls the stage
That is inserted into program is used to capture the program of log information.
In one embodiment, log information may include the time letter of each processing stage of current page in Web application
Breath.Wherein, which may include the temporal informations such as the render time of the page, network request time.Log acquisition unit
301, it is specifically used for: obtains Web application by running the Performance.timing () method in default log output program
The temporal information of each processing stage of middle current page is as log information.
In one embodiment, which may include the error information of Web application, wherein the error information can be with
It reports an error including browser and grammer such as reports an error at the information.Log acquisition unit 301, is specifically used for: by running default log output
The error information that Try { } Catch { } or Window.onerror () method in program obtain Web application is believed as log
Breath.
It should be noted that log information can include above-mentioned temporal information and error information, in addition to this, day simultaneously
Will information can also include other information, be not particularly limited herein.It is inserted by being called in hierarchical process in the logic that Web is applied
Enter default log output program, can capture Web application more fully log information, improve the integrity degree of log information.
Memory queue is written for passing through default upload script, wherein institute in the log information by log writing unit 302
The default script that uploads is stated to run using Web Worker separate threads.
Specifically, in one embodiment, log writing unit 302, is specifically used for: being transported by Web Worker separate threads
Row is default to upload script, and the log information of Web application page transmitting is received by PostMessage () method;With
And the log information is written in memory queue.
Quantity judging unit 303, for judging whether the quantity of the log information in the memory queue is greater than present count
Amount.
Reporting unit 304, if the quantity for the log information in the memory queue is greater than the preset quantity, by institute
The log information stated in memory queue reports to server.
In one embodiment, as shown in figure 5, Fig. 5 is a kind of reporting device of log information provided by the embodiments of the present application
Another schematic block diagram.The reporting device 300 of the log information further includes network judging unit 305 and storage unit 306.?
In embodiment shown in fig. 5, reporting unit 304 execute by the log information in the memory queue report to server it
Before, network judging unit 305, for judging whether network is in connection status.
When network judging unit 305 judges that network is in connection status, then reporting unit 304 is executed the memory
Log information in queue reports to the operation of server.When network judging unit 305 judges that network is not in connection status
When, storage unit 306 will save the log information to local memory.Meanwhile log information has been stored in storage unit 306
Afterwards, which is also used to report the log information to institute again when monitoring the network and being in connection status
State server.
In one embodiment, as shown in figure 5, the reporting device 300 of the log information further includes information judging unit 307.
Information judging unit 307, the feedback information sent for judging whether to receive the server.
After the log information in memory queue is reported to server by reporting unit 304, information judging unit 307 is sentenced
The disconnected feedback information for whether receiving the server and sending.If information judging unit 307 is judged not receive the service
The feedback information that device is sent, then storage unit 306 will save the log information to the local memory.
It should be noted that it is apparent to those skilled in the art that, for convenience of description and succinctly,
The reporting device 300 of the log information of foregoing description and the specific work process of each unit, can be with reference to aforementioned log information
Corresponding process in report method embodiment, details are not described herein.
The reporting device 300 of log information in the present embodiment, may be implemented in the main thread for being not take up Web application page
Reporting for log information is realized in the case where resource, thus the problem of avoiding Web application page Caton.
The reporting device of above-mentioned log information can be implemented as a kind of form of computer program, which can be with
It is run in computer equipment as shown in FIG. 6.
Referring to Fig. 6, Fig. 6 is a kind of schematic block diagram of computer equipment provided by the embodiments of the present application.The computer
500 equipment of equipment can be terminal.
Refering to Fig. 6, which includes processor 502, memory and the net connected by system bus 501
Network interface 505, wherein memory may include non-volatile memory medium 503 and built-in storage 504.
The non-volatile memory medium 503 can storage program area 5031 and computer program 5032.The computer program
5032 include program instruction, which is performed, and processor 502 may make to execute a kind of side of reporting of log information
Method.
The processor 502 supports the operation of entire computer equipment 500 for providing calculating and control ability.
The built-in storage 504 provides environment for the operation of the computer program 5032 in non-volatile memory medium 503, should
When computer program 5032 is executed by processor 502, processor 502 may make to execute a kind of report method of log information.
The network interface 505 such as sends the task dispatching of distribution for carrying out network communication.Those skilled in the art can manage
Solution, structure shown in Fig. 6, only the block diagram of part-structure relevant to application scheme, is not constituted to the application side
The restriction for the computer equipment 500 that case is applied thereon, specific computer equipment 500 may include more than as shown in the figure
Or less component, perhaps combine certain components or with different component layouts.
Wherein, the processor 502 is for running computer program 5032 stored in memory, to realize following function
Can: it obtains Web and applies corresponding log information;By the default script that uploads by log information write-in memory queue, wherein
The default upload script is run using Web Worker separate threads;Judge the quantity of the log information in the memory queue
Whether preset quantity is greater than;And if the quantity of the log information in the memory queue is greater than the preset quantity, will be described
Log information in memory queue reports to server.
In one embodiment, processor 502 is implemented as follows when executing acquisition Web using corresponding log information
Function: Web is obtained using corresponding log information by running default log output program, wherein the default log output
Program is to call the program for being used to capture log information being inserted into hierarchical process in the logic that Web is applied.
In one embodiment, processor 502 is being executed by running default log output program acquisition Web using corresponding
When log information, it is implemented as follows function: by running the Performance.timing () in default log output program
Method obtains the temporal information of each processing stage of current page in Web application as log information.
In one embodiment, processor 502 is being executed by running default log output program acquisition Web using corresponding
When log information, be implemented as follows function: by run Try { } Catch { } in default log output program or
Window.onerror () method obtains the error information of Web application as log information.
In one embodiment, processor 502 is being executed log information write-in memory team through the default script that uploads
When column, it is implemented as follows function: running default upload script by Web Worker separate threads, and pass through
PostMessage () method receives the log information of Web application page transmitting;Memory team is written into the log information
In column.
In one embodiment, processor 502 execute by the log information in the memory queue report to server it
Before, it also implements function such as: judging whether network is in connection status;If the network is in connection status, execution will be described
The step of log information in memory queue reports to server;If the network is not in connection status, the log is saved
Information reports the log information to the service to local memory again when monitoring the network and being in connection status
Device.
In one embodiment, processor 502 execute by the log information in the memory queue report to server it
Afterwards, it also implements function such as: judging whether to receive the feedback information that the server is sent;If not receiving the server
The feedback information of transmission saves the log information to the local memory.
It should be appreciated that in the embodiment of the present application, processor 502 can be central processing unit (Central
Processing Unit, CPU), which can also be other general processors, digital signal processor (Digital
Signal Processor, DSP), specific integrated circuit (Application Specific Integrated Circuit,
ASIC), ready-made programmable gate array (Field-Programmable GateArray, FPGA) or other programmable logic devices
Part, discrete gate or transistor logic, discrete hardware components etc..Wherein, general processor can be microprocessor or
The processor is also possible to any conventional processor etc..
A kind of computer readable storage medium is provided in another embodiment of the application.The computer readable storage medium
It is stored with computer program, processor is made to execute following procedure when wherein computer program is executed by processor: obtaining Web application
Corresponding log information;By the default script that uploads by log information write-in memory queue, wherein the default upload foot
This is run using Web Worker separate threads;Judge whether the quantity of the log information in the memory queue is greater than present count
Amount;And if the quantity of the log information in the memory queue be greater than the preset quantity, by the day in the memory queue
Will information reporting is to server.
In one embodiment, it when which is executed by processor acquisition Web using corresponding log information, specifically holds
Row following procedure: Web is obtained using corresponding log information by running default log output program, wherein the default day
Will output program is to call the program for being used to capture log information being inserted into hierarchical process in the logic that Web is applied.
In one embodiment, which is executed by processor is answered by running default log output program acquisition Web
When with corresponding log information, following procedure is specifically executed: by running in default log output program
Performance.timing () method obtains the temporal information of each processing stage of current page in Web application as day
Will information.
In one embodiment, which is executed by processor is answered by running default log output program acquisition Web
When with corresponding log information, following procedure is specifically executed: by running Try { } Catch { } in default log output program
Or Window.onerror () method obtains the error information of Web application as log information.
In one embodiment, which is executed by processor, and the log information is written by default upload script
When memory queue, following procedure is specifically executed: running default upload script by Web Worker separate threads, and pass through
PostMessage () method receives the log information of Web application page transmitting;Memory team is written into the log information
In column.
In one embodiment, which, which is executed by processor, reports to clothes for the log information in the memory queue
It is engaged in front of device, also execution following procedure: judging whether network is in connection status;If the network is in connection status, execute
The step of log information in the memory queue is reported into server;If the network is not in connection status, institute is saved
Log information is stated to local memory, and reports the log information to institute again when monitoring the network and being in connection status
State server.
In one embodiment, which, which is executed by processor, reports to clothes for the log information in the memory queue
It is engaged in after device, also execution following procedure: judging whether to receive the feedback information that the server is sent;If not receiving described
The feedback information that server is sent, saves the log information to the local memory.
The storage medium can be USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), magnetic disk or
The various media that can store program code such as person's CD.
Those of ordinary skill in the art may be aware that list described in conjunction with the examples disclosed in the embodiments of the present disclosure
Member and algorithm steps, can be realized with electronic hardware, computer software, or a combination of the two, in order to clearly demonstrate hardware
With the interchangeability of software, each exemplary composition and step are generally described according to function in the above description.This
A little functions are implemented in hardware or software actually, the specific application and design constraint depending on technical solution.Specially
Industry technical staff can use different methods to achieve the described function each specific application, but this realization is not
It is considered as beyond scope of the present application.
In several embodiments provided herein, it should be understood that disclosed device and method can pass through it
Its mode is realized.For example, the apparatus embodiments described above are merely exemplary.For example, the division of each unit, only
Only a kind of logical function partition, there may be another division manner in actual implementation.Such as multiple units or components can be tied
Another system is closed or is desirably integrated into, or some features can be ignored or not executed.
Step in the embodiment of the present application method can be sequentially adjusted, merged and deleted according to actual needs.This Shen
Please the unit in embodiment device can be combined, divided and deleted according to actual needs.In addition, in each implementation of the application
Each functional unit in example can integrate in one processing unit, is also possible to each unit and physically exists alone, can also be with
It is that two or more units are integrated in one unit.Above-mentioned integrated unit both can take the form of hardware realization,
It can also realize in the form of software functional units.
If the integrated unit is realized in the form of SFU software functional unit and when sold or used as an independent product,
It can store in one storage medium.Based on this understanding, the technical solution of the application is substantially in other words to existing skill
The all or part of part or the technical solution that art contributes can be embodied in the form of software products, the meter
Calculation machine software product is stored in a storage medium, including some instructions are used so that a computer equipment (can be a
People's computer, terminal or network equipment etc.) execute each embodiment the method for the application all or part of the steps.
The above, the only specific embodiment of the application, but the protection scope of the application is not limited thereto, it is any
Those familiar with the art within the technical scope of the present application, can readily occur in various equivalent modifications or replace
It changes, these modifications or substitutions should all cover within the scope of protection of this application.Therefore, the protection scope of the application should be with right
It is required that protection scope subject to.
Claims (10)
1. a kind of report method of log information characterized by comprising
It obtains Web and applies corresponding log information;
By the default script that uploads by log information write-in memory queue, wherein the default upload script uses Web
The operation of Worker separate threads;
Judge whether the quantity of the log information in the memory queue is greater than preset quantity;And
If the quantity of the log information in the memory queue is greater than the preset quantity, the log in the memory queue is believed
Breath reports to server.
2. the report method of log information according to claim 1, which is characterized in that the acquisition Web is using corresponding
Log information, comprising:
Web is obtained using corresponding log information by running default log output program, wherein the default log exports journey
Sequence is to call the program for being used to capture log information being inserted into hierarchical process in the logic that Web is applied.
3. the report method of log information according to claim 2, which is characterized in that described defeated by running default log
Program obtains Web and applies corresponding log information out, comprising:
Current page in Web application is obtained by running the Performance.timing () method in default log output program
Each processing stage temporal information as log information.
4. the report method of log information according to claim 2, which is characterized in that described defeated by running default log
Program obtains Web and applies corresponding log information out, comprising:
It obtains Web by running Try { } Catch { } in default log output program or Window.onerror () method and answers
The error information used is as log information.
5. the report method of log information according to claim 1, which is characterized in that described to be incited somebody to action by the default script that uploads
Memory queue is written in the log information, comprising:
Default upload script is run by Web Worker separate threads, and Web application is received by PostMessage () method
The log information of page transmitting;And
The log information is written in memory queue.
6. the report method of log information according to claim 1, which is characterized in that it is described will be in the memory queue
Log information report to before server, further includes:
Judge whether network is in connection status;
If the step of network is in connection status, and the log information in the memory queue is reported to server by execution;
If the network is not in connection status, the log information is saved to local memory, and monitoring at the network
Report the log information to the server again when connection status.
7. the report method of log information according to claim 6, which is characterized in that it is described will be in the memory queue
Log information report to after server, further includes:
Judge whether to receive the feedback information that the server is sent;
If not receiving the feedback information that the server is sent, the log information is saved to the local memory.
8. a kind of reporting device of log information characterized by comprising
Log acquisition unit, for obtaining Web using corresponding log information;
Log writing unit, for memory queue to be written in the log information by default upload script, wherein described default
Script is uploaded to run using Web Worker separate threads;
Quantity judging unit, for judging whether the quantity of the log information in the memory queue is greater than preset quantity;And
Reporting unit, if the quantity for the log information in the memory queue is greater than the preset quantity, by the memory
Log information in queue reports to server.
9. a kind of computer equipment, including memory, processor and it is stored on the memory and can be on the processor
The computer program of operation, which is characterized in that the processor realizes such as claim 1 to 7 when executing the computer program
Any one of method.
10. a kind of computer readable storage medium, which is characterized in that the computer-readable recording medium storage has computer journey
Sequence, the computer program execute the processor as described in any one of claims 1 to 7
Method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811389705.1A CN109491979A (en) | 2018-11-21 | 2018-11-21 | Report method, device, computer equipment and the storage medium of log information |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811389705.1A CN109491979A (en) | 2018-11-21 | 2018-11-21 | Report method, device, computer equipment and the storage medium of log information |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109491979A true CN109491979A (en) | 2019-03-19 |
Family
ID=65697224
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811389705.1A Pending CN109491979A (en) | 2018-11-21 | 2018-11-21 | Report method, device, computer equipment and the storage medium of log information |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109491979A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110460534A (en) * | 2019-07-26 | 2019-11-15 | 腾讯云计算(北京)有限责任公司 | A kind of request message report method, device, equipment and storage medium |
CN111552619A (en) * | 2020-04-29 | 2020-08-18 | 深圳市道旅旅游科技股份有限公司 | Log data display method and device, computer equipment and storage medium |
CN113760838A (en) * | 2021-09-09 | 2021-12-07 | 北京一起教育科技有限责任公司 | Live broadcast room front end offline storage method and device and electronic equipment |
CN114385954A (en) * | 2022-01-14 | 2022-04-22 | 北京字节跳动网络技术有限公司 | Information prediction method and device, computer equipment and storage medium |
CN114693254A (en) * | 2022-03-17 | 2022-07-01 | 中国工商银行股份有限公司 | Data processing method, device and computer readable storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102164043A (en) * | 2010-10-27 | 2011-08-24 | 青岛海信传媒网络技术有限公司 | Log reporting method and terminal |
US20130145361A1 (en) * | 2011-12-01 | 2013-06-06 | International Business Machines Corporation | Discovering and installing web application plugins |
CN107809337A (en) * | 2017-11-17 | 2018-03-16 | 深圳泉眼体育运营管理有限公司 | A kind of daily record method for uploading and device |
-
2018
- 2018-11-21 CN CN201811389705.1A patent/CN109491979A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102164043A (en) * | 2010-10-27 | 2011-08-24 | 青岛海信传媒网络技术有限公司 | Log reporting method and terminal |
US20130145361A1 (en) * | 2011-12-01 | 2013-06-06 | International Business Machines Corporation | Discovering and installing web application plugins |
CN107809337A (en) * | 2017-11-17 | 2018-03-16 | 深圳泉眼体育运营管理有限公司 | A kind of daily record method for uploading and device |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110460534A (en) * | 2019-07-26 | 2019-11-15 | 腾讯云计算(北京)有限责任公司 | A kind of request message report method, device, equipment and storage medium |
CN110460534B (en) * | 2019-07-26 | 2024-05-14 | 腾讯云计算(北京)有限责任公司 | Method, device, equipment and storage medium for reporting request message |
CN111552619A (en) * | 2020-04-29 | 2020-08-18 | 深圳市道旅旅游科技股份有限公司 | Log data display method and device, computer equipment and storage medium |
CN111552619B (en) * | 2020-04-29 | 2021-05-25 | 深圳市道旅旅游科技股份有限公司 | Log data display method and device, computer equipment and storage medium |
CN113760838A (en) * | 2021-09-09 | 2021-12-07 | 北京一起教育科技有限责任公司 | Live broadcast room front end offline storage method and device and electronic equipment |
CN114385954A (en) * | 2022-01-14 | 2022-04-22 | 北京字节跳动网络技术有限公司 | Information prediction method and device, computer equipment and storage medium |
CN114693254A (en) * | 2022-03-17 | 2022-07-01 | 中国工商银行股份有限公司 | Data processing method, device and computer readable storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109491979A (en) | Report method, device, computer equipment and the storage medium of log information | |
WO2016192488A1 (en) | Rolling release assessment method, device, and system | |
US11200086B1 (en) | Asynchronous transactions reported as critical path | |
CN111625452A (en) | Flow playback method and system | |
CN109710354A (en) | Page monitor method, page restoring method, device, equipment and medium | |
CN108762911A (en) | Timing task management method, apparatus, computer equipment and storage medium | |
CN109376071A (en) | Application software exception feedback method, device, computer equipment and storage medium | |
US9619773B2 (en) | Systems and methods for code instrumentation for analytics | |
WO2017189006A1 (en) | Predictive rollup and caching for application performance data | |
CN108762966A (en) | System exception hold-up interception method, device, computer equipment and storage medium | |
CN109271213A (en) | Loading method, device, computer equipment and the storage medium of the HTML5 page | |
CN108874642A (en) | SQL method for monitoring performance, device, computer equipment and storage medium | |
CN109144862A (en) | Statistical method, device, computer equipment and the storage medium of test data | |
CN109815111A (en) | Gray scale test method, device, computer equipment and storage medium | |
CN108470004A (en) | Test script generation method, test method, device, equipment and storage medium | |
CN108197002B (en) | Mobile device non-buried point data statistical method, system, terminal and medium | |
CN109800098A (en) | Service exception node positioning method, device, computer equipment and storage medium | |
CN106407219B (en) | Crawling method and device for webpage links | |
CN109933385B (en) | Page loading method, device, system and medium | |
CN110263070A (en) | Event report method and device | |
CN108519903A (en) | Static resource adaptation method, device, computer equipment and storage medium | |
CN109120684A (en) | Informatization management method, device, ESB bus platform and storage medium | |
CN107704365B (en) | Monitoring data reporting method and device for mobile terminal hybrid application | |
CN108829587A (en) | Test case parameter replacing method, device, computer equipment and storage medium | |
US20190129813A1 (en) | System and a method for providing on-demand resiliency services |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190319 |