Glossy is a lightweight JavaScript library designed for parsing and producing raw syslog messages. It supports multiple RFC standards including RFC 3164, RFC 5424, and RFC 5848. The library is unique in that it performs no network interactions itself, leaving the integration with UDP or TCP to the developer. It boasts zero external dependencies and was designed to be operable in various JavaScript environments, including browsers, in addition to Node.js. The current stable version, 0.1.7, was published 11 years ago, indicating an abandoned status. Its primary differentiators were its RFC compliance, dependency-free nature, and flexibility in deployment, though its age now presents significant compatibility challenges with modern JavaScript ecosystems.
npm install glossyVerified import paths — ran on the pinned version, not inferred.
Demonstrates setting up a UDP server to listen for incoming syslog messages on port 514 and parse them using `glossy.Parse`. It logs the host and message content of each parsed syslog entry.
For new projects, consider using actively maintained syslog libraries or implementing custom parsers/producers. For existing projects, thoroughly audit the code, consider vendoring, and implement extensive testing.
When initializing `glossy.Produce`, specify `{ type: 'BSD' }` in the constructor options if you need to generate RFC 3164 compliant messages. Example: `new Produce({ type: 'BSD', ...otherOptions })`.Use `const { Name } = require('glossy');` for all imports. If you must use ESM in your project, you'll need to configure your build system to handle CommonJS modules or use dynamic imports (`import('glossy')`).Consider running the syslog server on a non-privileged port (e.g., `5514`) and configure your firewall or a dedicated syslog daemon (like `rsyslog` or `syslog-ng`) to forward messages from port 514 to your application's higher port. Alternatively, use operating system capabilities to grant port binding permission without full root access.
Ensure your file is treated as a CommonJS module (e.g., `.js` file without `"type": "module"` in package.json), or use dynamic `import('glossy').then(({ Parse }) => ...)` if you need to use `glossy` within an ESM context.Ensure you are correctly destructuring `Parse` from the `require` statement: `const { Parse } = require('glossy');` then call `Parse.parse(...)`.No dependency data recorded yet.