5.0.0-object-context-arg-c1b9a971586a53f5fb6e47dcfddc3687f09cf670 • Published 5 years ago
@balena/event-log v5.0.0-object-context-arg-c1b9a971586a53f5fb6e47dcfddc3687f09cf670
Balena Event Log
Balena event logging facility.
Installing
$ npm install @balena/event-logUsing
var EventLog = require('@balena/event-log')
var eventLogger = EventLog({
debug: true,
mixpanelToken: MIXPANEL_TOKEN,
mixpanelHost: 'api.mixpanel.com',
gaSite: 'balena-cloud.com',
gaId: GA_ID,
prefix: 'UI, CLI, etc.',
// Hooks:
beforeCreate: function (type, jsonData, applicationId, deviceId, callback) {
this.start('User ID', callback)
}
afterCreate: function (error, type, jsonData, applicationId, deviceId) {
if (type === 'User Logout') {
this.end()
}
if (error) {
console.error(error)
}
}
})
// Example logged event:
eventLoger.user.login(
{ json: 'data' }, // Or null
'Application ID', // Optional
'Device ID' // Optional
)
// Example logged event without params:
eventLoger.user.login()Options
prefix- subsystem name like UI or CLI, acts as events names prefix[debug = false]— will print some warnings[mixpanelToken = null]- if set events will be reported to mixpanel[mixpanelHost = null]- if set will override the default mixpanel API host[gaSite = null],[gaSite = null]- if set events will be reported to GA
Hooks:
beforeCreate = function (type, jsonData, applicationId, deviceId, callback) { return callback() }
afterCreate = function (error, type, jsonData, applicationId, deviceId) {}6.8.0
3 years ago
6.8.0-build-add-autogenerated-app-name-tracking-a6bda59a51055477d28d90b7248241094b7209a6-1
3 years ago
6.7.0
3 years ago
6.5.0
3 years ago
6.5.0-build-add-new-device-and-release-actions-f195e566d39be865fac972f0258267bcb32b2582-1
3 years ago
6.6.0
3 years ago
6.6.0-build-add-credits-runway-calculator-tracking-575924c018f15686aa5ef861dcb0c79799ba4926-2
3 years ago
6.5.1
3 years ago
6.4.0
3 years ago
6.3.0
3 years ago
6.3.1
3 years ago
6.2.1
3 years ago
6.2.0
4 years ago
6.1.0
4 years ago
6.0.0
4 years ago
5.1.2
5 years ago
5.1.1
5 years ago
5.1.0
5 years ago
5.0.2
5 years ago
5.0.1
5 years ago
5.0.0
5 years ago
4.1.1
5 years ago
4.1.0
6 years ago
4.0.1
6 years ago
4.0.0
6 years ago
3.1.0
6 years ago
3.0.0
6 years ago
2.0.0
6 years ago