8.0.0 • Published 20 days ago
anys-web-plugin-monitor-error v8.0.0
AnysMonitorErrorPlugin
Monitor error.
Install
npm i anys-web-plugin-monitor-error
<script src="https://unpkg.com/anys-web-plugin-monitor-error"></script>
Usage
import { AnysMonitorErrorPlugin } from 'anys-web-plugin-monitor-error';
<script>
const { AnysMonitorErrorPlugin } = window.anys;
const anys = new Anys({
plugins: [AnysMonitorErrorPlugin],
});
</script>
Options
- error: boolean, wheather monitor JSError, default
true
- unhandledrejection: boolean, wheather monitor Promise rejection, default
true
const anys = new Anys({
unhandledrejection: false,
});
Log
error
{
type: 'JSError',
level: 590,
time: Date.now(),
msg: message,
name,
detail: {
stack,
filename,
colno,
lineno,
},
}
{
type: 'DownloadError',
level: 589,
time: Date.now(),
name: target.tagName,
detail: {
e: getPath(target),
},
}
unhandledrejection
{
type: 'PromiseRejection',
level: 585,
time: Date.now(),
name,
detail: { message },
}
8.0.0
20 days ago
7.0.0
2 months ago
6.4.0
5 months ago
6.3.0
5 months ago
6.2.0
5 months ago
6.3.1
5 months ago
6.1.1
6 months ago
6.0.0
6 months ago
5.0.3
6 months ago
5.0.2
7 months ago
5.0.0
7 months ago
4.0.0
7 months ago
3.1.0
8 months ago
3.0.2
8 months ago
3.0.1
8 months ago
3.0.0
8 months ago
2.0.2
8 months ago
2.0.0
8 months ago
1.4.0
8 months ago
1.2.0
9 months ago
1.1.3
9 months ago
1.1.0
9 months ago
1.0.1
9 months ago