
Security News
TypeScript is Porting Its Compiler to Go for 10x Faster Builds
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
@balena/event-log
Advanced tools
Balena events logging util
Balena event logging facility.
$ npm install @balena/event-log
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()
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 GAbeforeCreate = function (type, jsonData, applicationId, deviceId, callback) { return callback() }
afterCreate = function (error, type, jsonData, applicationId, deviceId) {}
FAQs
Balena events logging util
The npm package @balena/event-log receives a total of 857 weekly downloads. As such, @balena/event-log popularity was classified as not popular.
We found that @balena/event-log demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.