Skip to main content

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("YOUR_BOT_TOKEN", 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("YOUR_BOT_TOKEN", 123456789)

🆔 chat_id (int)

Your Telegram chat ID (can be a group or private chat).

Example:

setup_logger("YOUR_BOT_TOKEN", 987654321)

📊 level (logging level)

Controls the minimum log level sent to Telegram. Default: logging.INFO.

Example:

import logging
setup_logger("YOUR_BOT_TOKEN", 123456789, level=logging.ERROR)

time (bool)

Whether to include a timestamp in your logs. Default: True.

Example (disable time):

setup_logger("YOUR_BOT_TOKEN", 123456789, time=False)

🖥 show_logs (bool)

Also print logs to your console. Default: True.

Example (disable console output):

setup_logger("YOUR_BOT_TOKEN", 123456789, show_logs=False)

📝 fetch_print (bool)

Capture print() messages and send them to Telegram. Default: True.

Example (disable capturing print):

setup_logger("YOUR_BOT_TOKEN", 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("YOUR_BOT_TOKEN", 123456789, level_info=False)

🧩 4. Full Setup Example (All Defaults)

from loggerXio import setup_logger
import logging

# Setup with all default parameters
logger = setup_logger(
    "YOUR_BOT_TOKEN",  # bot_token
    123456789,         # chat_id
    level=logging.INFO,
    time=True,
    show_logs=True,
    fetch_print=True,
    level_info=True
)

# Test logging
logger.info("Hello from loggerXio!")
print("This is a print message.")

📌 Notes

  • If you disable level_info=True, normal logging levels won't be used — only print() messages will be captured.
  • Works in private chats, groups, channels.
  • Uses threads to avoid blocking your main program.

✨ Credits & Rights

© 2025 All Rights Reserved.
Developed and Created by

─ㅤ𝐀ㅤʀㅤɪㅤꜱㅤᴇㅤメ.

Telegram GitHub

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

loggerxio-1.0.0.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

loggerxio-1.0.0-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file loggerxio-1.0.0.tar.gz.

File metadata

  • Download URL: loggerxio-1.0.0.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

Hashes for loggerxio-1.0.0.tar.gz
Algorithm Hash digest
SHA256 b8357c20fd4b11751bb48fca84d06f6ed9a75c108ca701c1bf09333a07104b0b
MD5 05e7b749b69a2a1dff1247a38e39021f
BLAKE2b-256 d63bef7b999d7083d0d4a00bef83072b3198855d802dafe7f7639e8cbed11ab8

See more details on using hashes here.

File details

Details for the file loggerxio-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: loggerxio-1.0.0-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

Hashes for loggerxio-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 366045b609150f7a286007a312049e80aac9017d07d61295554cda709a23e173
MD5 7c77d7dfadac2f524cd2d49a94137747
BLAKE2b-256 72b6442364c8973613627f43fb3635b2d71579c47c91acf5a8ed1fc13c76cc3d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page