Skip to content

The syslog protocol (rfc5424) client. Works with Node.js over udp (rfc5426), tcp (rfc6587) and tls (rfc5425)

License

Notifications You must be signed in to change notification settings

awesomeorganization/syslog

Repository files navigation

syslog

💥 [ESM] The syslog protocol (rfc5424) client. Works with Node.js over udp (rfc5426), tcp (rfc6587) and tls (rfc5425)


npm npm npm npm npm npm


Example

Full example in /example folder.

import { syslog } from '@awesomeorganization/syslog'

const example = async () => {
  {
    const log = syslog({
      defaultStructuredData: {
        '8bf8cc10-4140-4c3e-a2b4-e6f5324f1aea@41058': {
          tag: 'tcp',
        },
      },
      host: 'logs-01.loggly.com',
      port: 514,
      protocol: 'tcp',
    })

    await log({
      message: 'Works with tcp!',
    })
  }
  {
    const log = syslog({
      defaultStructuredData: {
        '8bf8cc10-4140-4c3e-a2b4-e6f5324f1aea@41058': {
          tag: 'tls',
        },
      },
      host: 'logs-01.loggly.com',
      port: 6514,
      protocol: 'tls',
    })

    await log({
      message: 'Works with tls!',
    })
  }
}

example()

About

The syslog protocol (rfc5424) client. Works with Node.js over udp (rfc5426), tcp (rfc6587) and tls (rfc5425)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published