6.8.0 • Published 12 months ago
@balena/event-log v6.8.0
Balena Event Log
Balena event logging facility.
Installing
$ npm install @balena/event-log
Using
var EventLog = require('@balena/event-log')
var eventLogger = EventLog({
debug: true,
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
Hooks:
beforeCreate = function (type, jsonData, applicationId, deviceId, callback) { return callback() }
afterCreate = function (error, type, jsonData, applicationId, deviceId) {}
6.8.0
12 months ago
6.8.0-build-add-autogenerated-app-name-tracking-a6bda59a51055477d28d90b7248241094b7209a6-1
12 months ago
6.7.0
1 year ago
6.5.0
1 year ago
6.6.0
1 year ago
6.6.0-build-add-credits-runway-calculator-tracking-575924c018f15686aa5ef861dcb0c79799ba4926-2
1 year ago
6.5.1
1 year ago
6.4.0
1 year ago
6.3.0
2 years ago
6.3.1
1 year ago
6.2.1
2 years ago
6.2.0
2 years ago
6.1.0
2 years ago
6.0.0
3 years ago
5.1.2
3 years ago
5.1.1
3 years ago
5.1.0
3 years ago
5.0.2
3 years ago
5.0.1
3 years ago
5.0.0
3 years ago
4.1.1
3 years ago
4.1.0
4 years ago
4.0.1
4 years ago
4.0.0
4 years ago
3.1.0
4 years ago
3.0.0
4 years ago
2.0.0
4 years ago