Client of zhuque - a log collecting and analysing platform. visite https://github.com/azl397985856/zhuque for more info
copy zhuque-client.js into your workspace and import it by injecting script tag
// for error log
errorLog.init({
remoteLogging: true,
remoteSettings: {
url: 'http://localhost:1333/log',
additionalParams: {
userId: '1089288',
username: 'zpl',
password: 'zpl',
type: 'error'
},
successCallback: function () {
console.log('errorLog logged.');
},
errorCallback: function () {
console.log('Err! Something went wrong.');
}
}
});
// for performance log
perfLog.init({
remoteLogging: true,
remoteSettings: {
url: 'http://localhost:1333/log',
additionalParams: {
userId: '1089288',
username: 'zpl',
password: 'zpl',
type: 'performance'
},
successCallback: function () {
console.log('perfLog logged.');
},
errorCallback: function () {
console.log('Err! Something went wrong.');
}
}
});
We welcome all contributions, please submit any ideas as pull requests or as a GitHub issue.
MIT
- 采样率
- 监控所有报错。 包括unhandledPromise 和 异步错误。
异步可以使用事件捕获阶段监控,unhandledPromise可以监听对应事件