homey-log
v2.1.0
Published
Interface with Sentry for Homey
Downloads
122
Keywords
Readme
Homey Log
This module can be used in a Homey App to send events to Sentry.
Documentation
Documentation is available at https://athombv.github.io/node-homey-log/.
Related Modules
- 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
Installation
npm install --save homey-log
Getting started
In 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:[email protected]/123456"
}
In app.js
, include the library and create a new Log
instance:
const { Log } = require('homey-log');
class MyApp extends Homey.App {
onInit() {
this.homeyLog = new Log({ homey: this.homey });
}
}
Notes
- When your app crashes due to an
uncaughtException
orunhandledRejection
, this will automatically be sent to Sentry. - When running your app with
homey app run
events will not be sent to Sentry.
Changelog
2.0.0
This version is only SDK version 3 compatible. It now requires a different way of setting up the Log
instance, see Getting Started.