lumberjack-client

1.0.3 • Public • Published

lumberjack-client

This is a small Lumberjack V2 client supporting JSON data, compression and TLS sockets. The client will do its best to reconnect when disconnected, queuing its outgoing messages as necessary.

Socket

const client = new LumberjackClient({
  host: 'localhost',
  port: 5044,
})

client.log({
  '@timestamp': new Date()
  host: {
    hostname: os.hostname(),
  },
  message: 'hello world',
})

TLS Socket

const client = new LumberjackClient({
  host: 'localhost',
  port: 5044,
  cert: fs.readFileSync('client.crt'),
  key: fs.readFileSync('client.key'),
  ca: [fs.readFileSync('ca.pem')],
}, true)

client.log({
  '@timestamp': new Date()
  host: {
    hostname: os.hostname(),
  },
  message: 'hello tls server',
})

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.3
    335
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.3
    335
  • 1.0.2
    17
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i lumberjack-client

Weekly Downloads

352

Version

1.0.3

License

ISC

Unpacked Size

3.92 kB

Total Files

3

Last publish

Collaborators

  • johnoliverdriscoll