{"id":23626273,"url":"https://github.com/datalust/winston-seq","last_synced_at":"2026-03-11T08:33:46.664Z","repository":{"id":44797924,"uuid":"380089588","full_name":"datalust/winston-seq","owner":"datalust","description":"A Winston v3 transport for Seq","archived":false,"fork":false,"pushed_at":"2025-05-12T01:02:12.000Z","size":1123,"stargazers_count":14,"open_issues_count":1,"forks_count":4,"subscribers_count":6,"default_branch":"dev","last_synced_at":"2025-09-21T17:36:24.536Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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,"zenodo":null}},"created_at":"2021-06-25T01:14:25.000Z","updated_at":"2025-05-12T01:01:07.000Z","dependencies_parsed_at":"2024-06-18T17:11:10.681Z","dependency_job_id":"af77f660-0db0-4078-a7d8-638893524be3","html_url":"https://github.com/datalust/winston-seq","commit_stats":{"total_commits":15,"total_committers":5,"mean_commits":3.0,"dds":0.5333333333333333,"last_synced_commit":"00f7a686b539875bccb318cdd44a88076849f664"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/datalust/winston-seq","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datalust%2Fwinston-seq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datalust%2Fwinston-seq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datalust%2Fwinston-seq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datalust%2Fwinston-seq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/datalust","download_url":"https://codeload.github.com/datalust/winston-seq/tar.gz/refs/heads/dev","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datalust%2Fwinston-seq/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30376309,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-11T06:09:32.197Z","status":"ssl_error","status_checked_at":"2026-03-11T06:09:17.086Z","response_time":84,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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:46.614Z","updated_at":"2026-03-11T08:33:46.634Z","avatar_url":"https://github.com/datalust.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `winston-seq` [![npm](https://img.shields.io/npm/v/@datalust/winston-seq.svg)](https://www.npmjs.com/package/@datalust/winston-seq)\n\nA [Winston](https://github.com/winstonjs/winston) v3 transport that sends structured logs to the [Seq log server](https://datalust.co/seq).\n\n![Structured logging with Seq](assets/seq-log-search-feature-2220w.gif)\n\n## Getting started\n\nAdd the `@datalust/winston-seq winston` and `winston` packages to your `package.json`, and configure `winston` with a `SeqTransport`:\n\n```ts\nimport winston from 'winston';\nimport { SeqTransport } from '@datalust/winston-seq';\n\nconst logger = winston.createLogger({\n  level: 'info',\n  format: winston.format.combine(  /* This is required to get errors to log with stack traces. See https://github.com/winstonjs/winston/issues/1498 */\n    winston.format.errors({ stack: true }),\n    winston.format.json(),\n  ),\n  defaultMeta: { /* application: 'your-app-name' */ },\n  transports: [\n    new winston.transports.Console({\n        format: winston.format.simple(),\n    }),\n    new SeqTransport({\n      serverUrl: \"https://your-seq-server:5341\",\n      apiKey: \"your-api-key\",\n      onError: (e =\u003e { console.error(e) }),\n      handleExceptions: true,\n      handleRejections: true,\n    })\n  ]\n});\n```\n\n* `serverUrl` - the URL for your Seq server's ingestion\n* `apiKey` - (optional) The [Seq API Key](https://docs.datalust.co/docs/getting-logs-into-seq#api-keys) to use\n* `onError` - Callback to execute when an error occurs within the transport \n* `handleExceptions` - (optional) Send an event [when an uncaught exception occurs](https://github.com/winstonjs/winston#handling-uncaught-exceptions-with-winston)\n* `handleRejections` - (optional) Send an event [when an unhandled promise rejection occurs](https://github.com/winstonjs/winston#handling-uncaught-promise-rejections-with-winston)\n\n## Send Log Events\n\nSend structured log events, with properties that can be used later for filtering and analysis:\n\n```ts\nlogger.info(\"Hello {name}\", {name: \"World\"});\n```\n\nAttach context by creating child loggers:\n\n```ts\nconst taskLogger = logger.child({ activity: \"purchase\" });\ntaskLogger.debug(\n    \"User {user} purchase product {product} at ${price}\", \n    {\n        user: \"Millie Gilbert\",\n        product: \"Yardtime Garden Shears\",\n        price: 29.99\n    });\n```\n\n![An event in Seq](assets/purchase.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatalust%2Fwinston-seq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdatalust%2Fwinston-seq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatalust%2Fwinston-seq/lists"}