https://github.com/wisembly/vendor-logging
https://github.com/wisembly/vendor-logging
Last synced: 10 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/wisembly/vendor-logging
- Owner: Wisembly
- License: other
- Created: 2016-02-04T16:15:01.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2016-04-18T12:17:30.000Z (almost 10 years ago)
- Last Synced: 2025-06-14T04:15:50.275Z (10 months ago)
- Language: JavaScript
- Size: 8.79 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Wisembly Logging Vendor
> Catches every asynchronous exception that may be triggered by your code, by hooking asynchronous functions.
## Basic usage
```js
var wisemblyLogging = new WisemblyLogging(true);
```
## Constructor options
If the constructor parameter is `true`, all the following options will be enabled:
- **hookEventListeners** will hook DOM event listeners (both via `addEventListener()` calls and `on{Event}` properties), including XHR ones
- **hookAnimationFrame** will hook HTML5 `requestionAnimationFrame()`
- **hookTimeout** will hook `setTimeout`
- **hookInterval** will hook `setInterval`
## Third-party builtin support
This module will use Logmatic together with Stacktrace.js when available, and degrade gracefully when they're not. It won't do anything if none of them can be located.
## Custom reporting
Should you want to define your own messaging action, feel free to override the `captureMessage` function to do whatever you want. However, overriding `captureException` should probably be avoided (since it uses `captureMessage`, any override that you may have set there will be used by `captureException`).
## Compatibility
This module uses a fair bit of magic, and might conflict with other libraries, even if unlikely (how many other libraries redefine `on{Event}` properties, really?). Your mileage may vary. Caution. Warnung. Prudence. Cautela. Waarschuwingscommando.
## License
MIT. See `LICENSE.md`