Skip to content

theromanticsoul/telelogi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Telelogi — logs to Telegram.

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.

Why Telelogi?

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.


📦 Installation

npm install telelogi

🚀 Quick start

  1. Open Telegram and find @BotFather
  2. Create a new bot using the /newbot command
  3. Copy the bot token provided by BotFather
  4. 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

🧩 API

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.)

When not to use Telelogi

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.


License

MIT

About

Free Telegram logging for small applications

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors