squeeks/glossy — pull request #20 by horpto (2014-11-16 16:21:55+00:00)
Title: Explicit string coercion for safe trimming

Next code throws "TypeError: messageElement.trim is not a function" error for me. But if type is 'bsd' then msg will be "<163>Nov 16 21:02:05 localhost sudo[123]: Nice, Neat, New, Oh Wow".

Actually, process pid is almost always an integer, not a string.
```javascript
var syslogProducer = new GlossyProducer({type:'RFC5424'}); // 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'
});
console.log(msg);
```