@flareapp/vue 2.2.1 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +13 -1
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @flareapp/vue
2
2
 
3
- Vue integration for [Flare](https://flareapp.io) error tracking. Installs a Vue error handler that catches component errors and reports them to Flare with Vue-specific context (component name, lifecycle info).
3
+ Vue integration for [Flare](https://flareapp.io) error tracking and logging. Installs a Vue error handler that catches component errors and reports them to Flare with Vue-specific context (component name, lifecycle info).
4
4
 
5
5
  ## Installation
6
6
 
@@ -28,6 +28,18 @@ flareVue(app);
28
28
  app.mount('#app');
29
29
  ```
30
30
 
31
+ ## Logging
32
+
33
+ Beyond errors, the client can send structured logs. Logs are opt-in: enable them with `enableLogs`, then call any of the eight syslog levels (`debug`, `info`, `notice`, `warning`, `error`, `critical`, `alert`, `emergency`).
34
+
35
+ ```js
36
+ import { flare } from '@flareapp/js';
37
+
38
+ flare.configure({ enableLogs: true });
39
+
40
+ flare.logger.info('Checkout started', { cartId: cart.id, total: cart.total });
41
+ ```
42
+
31
43
  ## Documentation
32
44
 
33
45
  Full documentation on the Vue error handler and its options is available at [flareapp.io/docs/vue/general/installation](https://flareapp.io/docs/vue/general/installation).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flareapp/vue",
3
- "version": "2.2.1",
3
+ "version": "2.3.0",
4
4
  "description": "Vue client for flareapp.io",
5
5
  "homepage": "https://flareapp.io",
6
6
  "bugs": "https://github.com/spatie/flare-client-js/issues",
@@ -57,7 +57,7 @@
57
57
  "vue-router": "^5.0.0"
58
58
  },
59
59
  "peerDependencies": {
60
- "@flareapp/js": "^2.2.1",
60
+ "@flareapp/js": "^2.3.0",
61
61
  "vue": "^3.0.0",
62
62
  "vue-router": "^4.0.0 || ^5.0.0"
63
63
  },