Log
new Log(homey, options)Construct a new Log instance.
Parameters
Name | Type | Description |
---|---|---|
homey
|
object |
|
options
|
object | Additional options for Raven |
Example
class MyApp extends Homey.App {
onInit() {
this.homeyLog = new Log({ homey: this.homey });
}
}
Methods
captureException
(async) captureException(err): Promise.<string>|undefinedCreate and send exception event to Sentry. See the raven-node documentation: https://docs.sentry.io/clients/node/usage/#capturing-errors
Parameters
Name | Type | Description |
---|---|---|
err
|
Error | Error instance to be sent |
Returns
captureMessage
(async) captureMessage(message): Promise.<string>|undefinedCreate and send message event to Sentry. See the raven-node documentation: https://docs.sentry.io/clients/node/usage/#capturing-messages
Parameters
Name | Type | Description |
---|---|---|
message
|
string | Message to be sent |
Returns
setExtra
setExtra(extra): LogSet extra
that will be send as context with every message or error. See the raven-node
documentation: https://docs.sentry.io/clients/node/usage/#raven-node-additional-context.
Parameters
Name | Type | Description |
---|---|---|
extra
|
object |
Returns
setTags
setTags(tags): LogSet tags
that will be send as context with every message or error. See the raven-node
documentation: https://docs.sentry.io/clients/node/usage/#raven-node-additional-context.
Parameters
Name | Type | Description |
---|---|---|
tags
|
object |
Returns
setUser
setUser(user): LogSet user
that will be send as context with every message or error. See the raven-node
documentation: https://docs.sentry.io/clients/node/usage/#raven-node-additional-context.
Parameters
Name | Type | Description |
---|---|---|
user
|
object |