-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Description
In Producing part of the front page, here is the example you dropped:
var syslogProducer = require('glossy').Produce; // or wherever glossy lives
var msg = syslogProducer.produce({
facility: 'local4', // these can either be a valid integer,
severity: 'error', // or a relevant string
host: 'localhost',
appName: 'sudo',
pid: '123',
date: new Date(Date()),
message: 'Nice, Neat, New, Oh Wow'
});
I found that syslogProducer is in fact a constructor, so your example doesn't work as is: one as to first initialize a new producer. Here is a suggestion:
const syslogProducer = new (require('glossy').Produce)() // or wherever glossy lives
const msg = syslogProducer.produce({
facility: 'local4', // these can either be a valid integer,
severity: 'error', // or a relevant string
host: 'localhost',
appName: 'sudo',
pid: '123',
date: new Date(),
message: 'Nice, Neat, New, Oh Wow',
})
Metadata
Metadata
Assignees
Labels
No labels