Telelogi is a small library that lets you send logs and alerts straight to Telegram using a bot. It is built on top of grammy and helps you quickly see what is happening in your app — right in Telegram without setting up heavy logging or monitoring tools.
Telelogi is made for small applications and side projects where full monitoring is unnecessary. It sends important logs and errors directly to Telegram, so you can stay informed and react quickly without extra tools.
npm install telelogi- Open Telegram and find @BotFather
- Create a new bot using the
/newbotcommand - Copy the bot token provided by BotFather
- Use the token to create a Telelogi client in your application
import { createClient } from 'telelogi'
export const telelogi = createClient(process.env.BOT_TOKEN)try {
// ...
telelogi.success('Success!', data)
} catch (error) {
// ...
telelogi.error('Api Request Error', error)
}Once your bot is running, send /start to it to subscribe to logs
Telelogi exposes a simple client with four methods. Each method sends a message to Telegram with a corresponding log level.
telelogi.success(title, data?)
telelogi.info(title, data?)
telelogi.warn(title, data?)
telelogi.error(title, data?)title— a short description of the event (maximum of 900 characters)data(optional) — any JSON-serializable data (error details, payloads, etc.)
Telelogi is designed to be simple and lightweight. It may not be the best choice if:
- You need complex log routing, filtering, or analytics
- You already use a full-featured logging/monitoring stack (ELK, Grafana, Sentry, etc.)
- You need high‑throughput logging (thousands of logs per second)
- Telegram is not an acceptable place for your logs (security, compliance, or policy reasons)
In these cases, a dedicated logging or monitoring solution will suit you better.
MIT