Client error log collecting method and client error log collecting system

A collection system and client-side technology, which is applied in the field of client-side error log collection and system, can solve problems such as user loss, easy delay of fault handling time, adverse effects, etc., and achieve the effect of improving usability

Active Publication Date: 2014-12-03
SHANGHAI CTRIP COMMERCE CO LTD
View PDF3 Cites 6 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

This approach will not only cause losses and adverse effects to users, but also easily delay the processing time of faults.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Client error log collecting method and client error log collecting system
  • Client error log collecting method and client error log collecting system
  • Client error log collecting method and client error log collecting system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0024] like figure 1 As shown, the present invention provides a method for collecting client error logs, including:

[0025] Step S1, define a global function run, and place the global function in the outer layer of the JS code running function of the accessed page, the global function uses the try catch syntax error capture method to obtain all JS code errors of the client, and The global function does not throw the error of the JS code in the catch, but places it in a global variable globalError;

[0026] The specific implementation procedure of step S1 can be as follows:

[0027]

[0028]

[0029] Step S2, use a timer to access the global variable globalError when the access page is running, and once an error of the JS code of the client is found in the global variable, use the throw method to throw the error of the JS code to the window.onerror event In this way, the problem of cross-domain script error can be solved;

[0030] The specific implementation procedure...

Embodiment 2

[0043] like figure 2 As shown, the present invention also provides another client error log collection system, including a global function module 1 , a timer module 2 and a window.onerror event module 3 .

[0044] The global function module 1 is used to define a global function, and place the global function in the outer layer of the JS code running function of the access page. The global function uses the try catch syntax error capture method to obtain all the JS codes of the client error, and the global function does not throw the error of the JS code in the catch, but places it in a global variable.

[0045] The timer module 2 is used to access the global variable when the access page is running. Once an error of the JS code of the client is found in the global variable, use the throw method to throw the error of the JS code into the window.onerror event .

[0046]The window.onerror event module 3 is used to obtain all error messages and corresponding client information ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention provides a client error log collecting method and a client error log collecting system. According to the method, a global function is placed to an outer layer of a JS code operation function of an accessed page, the global function uses try catch to obtain all JS code errors of a client, and in addition, the global function places the JS code errors into a global variable instead of throwing out the JS code errors in the catch; during the operation of the accessed page, a timer is used for accessing the global variable, when the JS code errors of the client are discovered in the global variable, a throw method is used for throwing the JS code errors into a window. onerror event; all error information and corresponding client information are obtained in the window.onerror event according to the JS code errors, and in addition, all error information and the corresponding client information are returned to an error log collecting server. The method and the system provided by the invention have the advantages that the detail error information of the client when a real user accesses a website can be collected in time, so that error sources can be fast positioned during subsequent analysis and error elimination, and the website availability is improved.

Description

technical field [0001] The invention relates to a method and system for collecting client error logs. Background technique [0002] At present, due to the complex and unique network environment, computer system, and browser version of the client accessing the Internet, the website can only be tested by simulating a typical environment before the website is released. now. [0003] The existing practice is to contact the client only when a large number of user clients report failures, and the client needs to provide specific information before troubleshooting. This approach will not only cause loss and bad influence to the user, but also easily delay the processing time of the fault. Contents of the invention [0004] The purpose of the present invention is to provide a method and system for collecting client error logs, which can timely collect detailed error information of the client when real users visit the website, so as to quickly locate the error source for subseque...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06F11/34G06F9/44
Inventor 储诚栋
Owner SHANGHAI CTRIP COMMERCE CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products