{"id":18937677,"url":"https://github.com/logflare/winston-logflare","last_synced_at":"2025-04-15T18:32:22.135Z","repository":{"id":42737262,"uuid":"265692606","full_name":"Logflare/winston-logflare","owner":"Logflare","description":null,"archived":false,"fork":false,"pushed_at":"2022-08-05T04:08:40.000Z","size":28,"stargazers_count":2,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-08T19:17:09.982Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Logflare.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-20T21:44:51.000Z","updated_at":"2023-08-20T20:07:02.000Z","dependencies_parsed_at":"2022-09-10T03:02:08.681Z","dependency_job_id":null,"html_url":"https://github.com/Logflare/winston-logflare","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Logflare%2Fwinston-logflare","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Logflare%2Fwinston-logflare/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Logflare%2Fwinston-logflare/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Logflare%2Fwinston-logflare/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Logflare","download_url":"https://codeload.github.com/Logflare/winston-logflare/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249129298,"owners_count":21217326,"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-11-08T12:12:00.689Z","updated_at":"2025-04-15T18:32:17.129Z","avatar_url":"https://github.com/Logflare.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# winston-logflare\n\nThis module provides a transport for winston logger that forwards messages to [Logflare][logflare] app.\n\n## Installation\n\n```bash\n$ npm install winston-logflare\n```\n\n# Usage example\n\n```js\nconst winston = require(\"winston\")\nconst LogflareTransport = require(\"winston-logflare\")\n\nconst apiKey = \"...\"\nconst sourceToken = \"...\"\n\nconst logger = winston.createLogger({\n    level: \"info\",\n    format: winston.format.json(),\n    defaultMeta: {env: \"staging\"},\n    transports: [\n        new LogflareTransport({\n            apiKey,\n            sourceToken,\n            batchMaxSize: 1, // optional config setting\n            batchFlushInterval: 1000, // optional config setting\n        }),\n    ],\n})\n\nlogger.log(\"info\", \"info message\", {property: \"value\"})\nlogger.log(\"error\", \"Error occured!\")\n```\n\n## License\n\nLicensed under [MIT](./LICENSE).\n\n[logflare]: https://logflare.app/","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flogflare%2Fwinston-logflare","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flogflare%2Fwinston-logflare","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flogflare%2Fwinston-logflare/lists"}