seq-logging is a JavaScript library designed to send structured log events to the Seq HTTP ingestion API. It is currently at version 3.0.0 and serves as a low-level client, primarily intended for use by other logging frameworks and their respective Seq transports (e.g., winston-seq, pino-seq, bunyan-seq, @tsed/logger-seq), rather than for direct application interaction. The library handles asynchronous batching of log events based on payload size and provides mechanisms to ensure all buffered events are sent upon application exit or explicit flushing. Its key differentiator is acting as the foundational communication layer for Seq within the JavaScript ecosystem, offering both Node.js and browser-specific builds, and explicitly supports ESM.
npm install seq-loggingVerified import paths — ran on the pinned version, not inferred.
Initializes a Seq Logger and emits a structured log event with properties, demonstrating basic usage and proper shutdown.
Migrate your import statements to use ES module syntax (e.g., `import { Logger } from 'seq-logging'`). If using Node.js, ensure your project is configured for ESM (e.g., `"type": "module"` in package.json or using `.mjs` file extension).Always call `logger.close()` or `logger.flush()` before your application terminates to ensure all pending events are sent to Seq. Both methods return a Promise, which should be awaited.
Ensure your build system (e.g., Webpack, Rollup) or direct imports use `import { Logger } from 'seq-logging/browser'` when bundling for browsers, and `import { Logger } from 'seq-logging'` for Node.js.Upgrade your Node.js environment to version 14.18.0 or newer to ensure full compatibility and access to required features.
Change `const { Logger } = require('seq-logging');` to `import { Logger } from 'seq-logging';` and ensure your project is set up for ES Modules.When building for browsers, avoid direct use of Node.js globals like `process`. If environment variables are needed, pass them in at build time or use a browser-compatible method. Alternatively, ensure your bundler provides a `process` polyfill.
No dependency data recorded yet.