This module can be used in a Homey App to send events to Sentry.
Documentation is available at https://drenso.github.io/homey-log.
- node-homey-zwavedriver — Module for Z-Wave drivers
- node-homey-zigbeedriver — Module for Zigbee drivers
- node-homey-rfdriver — Module for RF (433 Mhz, 868 MHz, Infrared) drivers
- node-homey-oauth2app — Module for OAuth2 apps
npm install --save @drenso/homey-logIn env.json, add the Sentry URL. If you would like to send the logs to Sentry also during development, set force log to 1.
{
"HOMEY_LOG_FORCE": "0",
"HOMEY_LOG_URL": "https://foo:bar@sentry.io/123456"
}If you also set HOMEY_LOG_SENTRY_PROJECT this library with automatically configure the release version as <HOMEY_LOG_SENTRY_PROJECT>@<app-version>.
In app.js, include the library and create a new Log instance:
const { Log } = require('@drenso/homey-log');
class MyApp extends Homey.App {
onInit() {
this.homeyLog = new Log({ homey: this.homey });
}
}- When your app crashes due to an
uncaughtExceptionorunhandledRejection, this will automatically be sent to Sentry. - When running your app with
homey app runevents will not be sent to Sentry.
This version is only SDK version 3 compatible. It now requires a different way of setting up the Log instance, see Getting Started.
This version has replaced the raven SDK with @sentry/node version 8. If you were using the basic configuration, nothing has changed.
- If you were passing custom options, you will need to review them.
setExtrais deprecated by Sentry and has been removed.
This package will now follow the Sentry version included.
With 10.39 and onwards, we're using @sentry/node-core/light for this library.
From 10.3900 and onwards, the sentry minor and patch versions are combined into the minor version (minor * 100 + patch), so we can release patches when necessary.