{"id":18994531,"url":"https://github.com/wildegor/winston-telegram","last_synced_at":"2025-10-11T08:32:49.899Z","repository":{"id":215259613,"uuid":"738496559","full_name":"WildEgor/winston-telegram","owner":"WildEgor","description":"Winston Telegram - a winston trasport supports Telegram Notifications","archived":false,"fork":false,"pushed_at":"2024-01-04T04:58:52.000Z","size":331,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2025-02-01T20:17:10.019Z","etag":null,"topics":["clean-architecture","logging","telegram","telegram-bot","winston","winston-telegram"],"latest_commit_sha":null,"homepage":"","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/WildEgor.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":"2024-01-03T11:09:28.000Z","updated_at":"2024-01-07T14:21:20.000Z","dependencies_parsed_at":"2024-11-08T17:31:36.768Z","dependency_job_id":"4857bcfa-3f64-45df-9a28-c8445a078d41","html_url":"https://github.com/WildEgor/winston-telegram","commit_stats":null,"previous_names":["wildegor/winston-telegram"],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WildEgor%2Fwinston-telegram","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WildEgor%2Fwinston-telegram/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WildEgor%2Fwinston-telegram/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WildEgor%2Fwinston-telegram/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WildEgor","download_url":"https://codeload.github.com/WildEgor/winston-telegram/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240009591,"owners_count":19733503,"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":["clean-architecture","logging","telegram","telegram-bot","winston","winston-telegram"],"created_at":"2024-11-08T17:25:55.141Z","updated_at":"2025-10-11T08:32:44.879Z","avatar_url":"https://github.com/WildEgor.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Winston-Telegram\n\n[![NPM](https://nodei.co/npm/winston-telegram.png?downloads=true\u0026downloadRank=true\u0026stars=true)](https://www.npmjs.com/package/@wildegor/winston-telegram/)\n\nA [Telegram][0] transport for [winston][1].\n\nOriginally forked from [ivanmarban/winston-telegram][2] and updated to support winston 3.x and new features.\n\n[![Version npm](https://img.shields.io/npm/v/@wildegor/winston-telegram.svg)](https://www.npmjs.com/package/@wildegor/winston-telegram)\n[![npm Downloads](https://img.shields.io/npm/dw/@wildegor/winston-telegram.svg)](https://npmcharts.com/compare/@wildegor/winston-telegram?minimal=true)\n[![Tests Status](https://github.com/wildegor/winston-telegram/actions/workflows/testing.yml/badge.svg?branch=main)](https://github.com/wildegor/winston-telegram/actions/workflows/testing.yml)\n[![Coverage Status](https://coveralls.io/repos/github/wildegor/winston-telegram/badge.svg?branch=main)](https://coveralls.io/github/wildegor/winston-telegram?branch=main)\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n\n### Main features:\n- [x] Send log message to Telegram;\n- [x] Send log messages with batching delay;\n- [x] Send log messages with custom template;\n- [x] Send log messages with custom formatMessage function;\n- [x] Send log messages to specific chat;\n- [x] Send log messages to specific topic;\n- [x] Send log messages with silent mode;\n- [x] Send log messages with disable notification;\n- [x] Send log messages with custom parse mode;\n- [x] Send log messages with custom levels;\n- [x] Send log messages with handle exceptions;\n- [x] Send log messages with custom batching separator.\n\n## Installation:\n``` sh\n$ yarn add winston@3\n$ yarn add winston-transport@4\n$ yarn add axios\n$ yarn add @wildegor/winston-telegram@latest\n```\n\n## Usage\n``` js\nconst logger = require('winston')\nconst TelegramTransport = require('@wildegor/winston-telegram')\n\n// or\nimport { TelegramTransport } from '@wildegor/winston-telegram';\n\nlogger.add(new TelegramTransport(options))\n```\n\nOptions:\n\n* __token:__ The Telegram bot authentication token. *[required]*\n* __chatId:__ The Telegram chatid you want to send to. *[optional]*\n* __parseMode:__ The Telegram mode for parsing entities in the message text. See [formatting options][3] for more details. *[optional]*\n* __levels:__ Levels of messages that this transport should log. *[optional]* *[default ALL]*\n* __silent:__ Whether to suppress output. *[boolean]* *[optional]*\n* __disableNotification:__ Sends the message silently. *[boolean]* *[optional]*\n* __template:__ Format output message. *[string]* *[optional]*\n* __formatMessage:__ Format output message by own method. *[function]* *[optional]*\n* __handleExceptions:__ Handle uncaught exceptions. *[boolean]* *[optional]*\n* __batchingDelay:__ Time in ms within which to batch messages together. *[integer]* *[optional]* *[default 0 or disabled]*\n* __batchingSeparator:__ String with which to join batched messages with *[string]* *[default \"\\n\\n\"]*\n\nString template is based on named arguments:\n``` js\n'{level}' -\u003e level of messages\n'{message}' -\u003e text of messages\n'{metadata}' -\u003e metadata object of messages\n```\n\n## Examples\n\nFollow below steps to run the [examples][4]:\n\n``` sh\n$ git clone git@github.com:wildegor/winston-telegram.git -b main --single-branch\n$ yarn install\n```\n\nReplace `TELEGRAM_TOKEN` and `CHAT_ID` with appropriate values, then run whatever example you want:\n\n``` sh\n$ cd examples/simple-log # or examples/replace-nest-logger\n$ yarn install\n$ yarn start:dev\n```\n\n[0]: https://telegram.org/\n[1]: https://github.com/flatiron/winston\n[2]: https://github.com/ivanmarban/winston-telegram\n[3]: https://core.telegram.org/bots/api#formatting-options\n[4]: https://github.com/wildegor/winston-telegram/tree/main/examples\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwildegor%2Fwinston-telegram","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwildegor%2Fwinston-telegram","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwildegor%2Fwinston-telegram/lists"}