Telegram-Powered Python Logger - Send Logs & print() Output Straight to Your Chat in Real Time!
Project description
📦 loggerXio
🚀 Send your Python logs and print statements directly to Telegram using a bot.
No complex setup — just import, set your bot token & chat ID, and start logging.
🛠 1. Installation
pip install loggerXio
⚡ 2. Quick Setup
from loggerXio import setup_logger
# Replace with your bot token and chat ID
logger = setup_logger(bot_token="YOUR_BOT_TOKEN", chat_id=123456789)
✅ That's it! 🎉 Now all logs and print() messages will be sent to your Telegram chat.
⚙ 3. Parameters
All parameters default to True (except level, which defaults to logging.INFO).
You can turn any of them off by setting them to False in setup_logger().
🔑 bot_token (str)
Your Telegram bot token (get it from 🤖 BotFather).
Example:
setup_logger("bot_token=YOUR_BOT_TOKEN", chat_id=123456789)
🆔 chat_id (int)
Your Telegram chat ID (can be a group or private chat).
Example:
setup_logger(bot_token="YOUR_BOT_TOKEN", chat_id=987654321)
⏰ time (bool)
Whether to include a timestamp in your logs. Default: True.
Example (disable time):
setup_logger(bot_token="YOUR_BOT_TOKEN", chat_id=123456789, time=False)
🖥 show_logs (bool)
Also print logs to your console. Default: True.
Example (disable console output):
setup_logger(bot_token="YOUR_BOT_TOKEN", chat_id=123456789, show_logs=False)
📝 fetch_print (bool)
Capture print() messages and send them to Telegram. Default: True.
Example (disable capturing print):
setup_logger(bot_token="YOUR_BOT_TOKEN", chat_id=123456789, fetch_print=False)
📢 level_info (bool)
If True, uses standard logging levels (INFO, WARNING, ERROR).
If False, only captures print messages. Default: True.
Example (capture only print statements):
setup_logger(bot_token="YOUR_BOT_TOKEN", chat_id=123456789, level_info=False)
🧩 4. Full Setup Example (All Defaults)
from loggerXio import setup_logger
import logging
import time
# Setup with all default parameters
logger = setup_logger(
bot_token="YOUR_BOT_TOKEN",
chat_id=123456789,
time=True,
show_logs=True,
fetch_print=True,
level_info=True
)
# Test logging
logger.info("Hello from loggerXio!")
print("This is a print message.")
time.sleep(5) #Just for test script
📌 Notes
- If you disable
level_info=True, normal logging levels won't be used — onlyprint()messages will be captured. - Works in private chats, groups, channels.
- Uses threads to avoid blocking your main program.
- always when script start, first log will take few seconds for send log.
✨ Credits & Rights
© 2025 All Rights Reserved.
Developed and Created by
─ㅤ𝐀ㅤʀㅤɪㅤꜱㅤᴇㅤメ.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file loggerxio-1.0.8.tar.gz.
File metadata
- Download URL: loggerxio-1.0.8.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8b9bd8530449f70d75d472c29f494dcb26b64df951f73dfd8ffa430c938fe9bf
|
|
| MD5 |
872a14baae478c434a09fc31fce9b963
|
|
| BLAKE2b-256 |
10925e883d1dc97119cfd7e32431198f64690710da29ca7a57740dc06966c030
|
File details
Details for the file loggerxio-1.0.8-py3-none-any.whl.
File metadata
- Download URL: loggerxio-1.0.8-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3a12e709e25e77838600d4775df978f1210b4a5f7699ca4c0bb795fc3ba6b7f2
|
|
| MD5 |
56207acd273cbc9b2a3c2b414b9bc967
|
|
| BLAKE2b-256 |
1b77c94c9b0a23afd0d3278628fd4cbbb979890430e72fb635a460f11344404d
|