@flareapp/vue
v2.3.0
Published
Vue client for flareapp.io
Readme
@flareapp/vue
Vue integration for Flare 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).
Installation
npm install @flareapp/vue @flareapp/jsQuick start
Initialize the Flare client and register the Vue error handler:
import { createApp } from 'vue';
import { flare } from '@flareapp/js';
import { flareVue } from '@flareapp/vue';
import App from './App.vue';
flare.light('YOUR_FLARE_API_KEY');
const app = createApp(App);
flareVue(app);
app.mount('#app');Logging
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).
import { flare } from '@flareapp/js';
flare.configure({ enableLogs: true });
flare.logger.info('Checkout started', { cartId: cart.id, total: cart.total });Documentation
Full documentation on the Vue error handler and its options is available at flareapp.io/docs/vue/general/installation.
Compatibility
- Vue 3
License
The MIT License (MIT). Please see License File for more information.
