Skip to content

Latest commit

 

History

History
67 lines (43 loc) · 2.44 KB

README.md

File metadata and controls

67 lines (43 loc) · 2.44 KB

Homey Log

npm NPM pages-build-deployment

This module can be used in a Homey App to send events to Sentry.

Documentation

Documentation is available at https://drenso.github.io/homey-log.

Related Modules

Installation

npm install --save @drenso/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:bar@sentry.io/123456"
}

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 });
  }
}

Notes

  • When your app crashes due to an uncaughtException or unhandledRejection, 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.

3.0.0

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.
  • setExtra is deprecated by Sentry and has been removed.

8.*

This package will now follow the Sentry version included.