{"id":23626289,"url":"https://github.com/datalust/seq-logging","last_synced_at":"2025-04-09T19:16:34.878Z","repository":{"id":6079317,"uuid":"54701560","full_name":"datalust/seq-logging","owner":"datalust","description":"A Node.js client for the Seq HTTP ingestion API","archived":false,"fork":false,"pushed_at":"2025-02-22T06:08:03.000Z","size":444,"stargazers_count":29,"open_issues_count":2,"forks_count":15,"subscribers_count":7,"default_branch":"dev","last_synced_at":"2025-04-09T19:16:30.769Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/datalust.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-03-25T07:08:37.000Z","updated_at":"2025-04-03T09:15:45.000Z","dependencies_parsed_at":"2024-02-28T23:28:11.935Z","dependency_job_id":"e65b1d3b-2931-40f3-9a50-bea68f4f974c","html_url":"https://github.com/datalust/seq-logging","commit_stats":{"total_commits":115,"total_committers":18,"mean_commits":6.388888888888889,"dds":0.3826086956521739,"last_synced_commit":"ce6cea5fbf688db8e4f87dd96a24c86ddf334516"},"previous_names":["continuousit/seq-logging"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datalust%2Fseq-logging","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datalust%2Fseq-logging/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datalust%2Fseq-logging/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datalust%2Fseq-logging/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/datalust","download_url":"https://codeload.github.com/datalust/seq-logging/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248094988,"owners_count":21046770,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-27T22:52:48.873Z","updated_at":"2025-04-09T19:16:34.840Z","avatar_url":"https://github.com/datalust.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Seq Logging for JavaScript ![Build](https://github.com/datalust/seq-logging/workflows/Test/badge.svg) ![Publish](https://github.com/datalust/seq-logging/workflows/Publish/badge.svg) [![NPM](https://img.shields.io/npm/v/seq-logging.svg)](https://www.npmjs.com/package/seq-logging)\n\n\u003e This library makes it easy to support Seq from Node.js logging libraries, including [Winston](https://github.com/winstonjs/winston) via [winston-seq](https://github.com/datalust/winston-seq), [Pino](https://github.com/pinojs/pino) via [`pino-seq`](https://github.com/datalust/pino-seq), [Bunyan](https://github.com/trentm/node-bunyan) via [`bunyan-seq`](https://github.com/continuousit/bunyan-seq), and [Ts.ED logger](https://logger.tsed.io) via [@tsed/logger-seq](https://logger.tsed.io/appenders/seq.html). It is not expected that applications will interact directly with this package.\n\n### Requiring for Node\n\n```js\nconst seq = require('seq-logging');\n```\n\n### Requiring for a browser\n\nUsing `seq-logging` in a browser context is the same, except the module to import is `seq-logging/browser`.\n\n```js\nconst seq = require('seq-logging/browser');\n```\n\n### Usage\n\nA `Logger` is configured with `serverUrl`, and optionally `apiKey` as well as event and batch size limits.\n`requestTimeout` can be used to adjust timeout for stalled connections, default: 30s.\n\n```js\nconst process = require('process');\nconst seq = require('seq-logging');\n\nconst logger = new seq.Logger({ serverUrl: 'http://localhost:5341' });\n\nlogger.emit({\n    timestamp: new Date(),\n    level: 'Information',\n    messageTemplate: 'Hello for the {n}th time, {user}!',\n    properties: {\n        user: process.env.USERNAME,\n        n: 20\n    }\n});\n\nlogger.close();\n```\n\nEvents are sent using the `emit()` method, that internally performs asynchronous batching based on payload size.\n\nWhen the application exits, `close()` ensures all buffered events are written. This can be done at any time otherwise using the `flush()` method. Both of these methods return promises indicating completion.\n\n### Implementations\n\n * [bunyan-seq](https://github.com/datalust/bunyan-seq) - collect events from the Buyan logging framework\n * [pino-seq](https://github.com/datalust/pino-seq) - A stream to send Pino events to Seq\n * [winston-seq](https://github.com/datalust/winston-seq) - A Seq transport for Winston\n * [@tsed/logger-seq](https://logger.tsed.io/appenders/seq.html) - A Seq transport for Ts.ED logger\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatalust%2Fseq-logging","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdatalust%2Fseq-logging","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatalust%2Fseq-logging/lists"}