Skip to main content

Discord Logger

PyPI Python License

Simple Discord webhook logger for Python.


Installation

pip install baihu-discord-logger

Environment Variables (Optional)

You can configure avatars using environment variables instead of passing them in code:

  • DISCORD_OWNER_AVATAR_URL
  • DISCORD_WEBHOOK_AVATAR_URL

If these are not provided, the logger will default to None.


Set Environment Variables (Permanent Only)

Windows (PowerShell)

setx DISCORD_OWNER_AVATAR_URL "https://example.com/owner.png"
setx DISCORD_WEBHOOK_AVATAR_URL "https://example.com/webhook.png"

After setting, restart terminal or VSCode to apply changes.


Linux / macOS (bash / zsh)

Add the following lines to your shell configuration file (~/.bashrc, ~/.zshrc, or ~/.profile):

echo 'export DISCORD_OWNER_AVATAR_URL="https://example.com/owner.png"' >> ~/.bashrc
echo 'export DISCORD_WEBHOOK_AVATAR_URL="https://example.com/webhook.png"' >> ~/.bashrc

Then reload configuration:

source ~/.bashrc

(or restart your terminal if using zsh/macOS default shell)


Usage

from discord_logger import DiscordLogger

logger = DiscordLogger(webhook_url="YOUR_WEBHOOK_URL")

logger.info(title="Server", description="Server started")
logger.error(title="Database", description="Database crashed")

License

MIT License

Metadata

Release files for baihu-discord-logger 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for baihu-discord-logger 0.1.3
File Size Uploaded Provenance Actions
baihu_discord_logger-0.1.3.tar.gz 3.9 kB Without provenance Details for baihu_discord_logger-0.1.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for baihu-discord-logger 0.1.3
File Interpreter ABI Platform Actions
baihu_discord_logger-0.1.3-py3-none-any.whl Python 3 none any Details for baihu_discord_logger-0.1.3-py3-none-any.whl

Total release size: 8.7 kB

Release files / baihu_discord_logger-0.1.3.tar.gz

Download URL baihu_discord_logger-0.1.3.tar.gz
Size 3.9 kB
Tags Source
SHA-256 checksum
How to use checksums
11aba7f50f90a258c349ea4cabd07122e6fa6695664ba22e10505176b0dfc739
BLAKE2b-256 checksum
How to use checksums
bfa1c78d1d5f409661f9829ba53c5d4a7acf77c4497970fb95fd0b6240af3db8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.5

Release files / baihu_discord_logger-0.1.3-py3-none-any.whl

Download URL baihu_discord_logger-0.1.3-py3-none-any.whl
Size 4.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5d79d7d6d0f57447169b3b4be4641d73e33b4e7de0810137ea2ad74db529881c
BLAKE2b-256 checksum
How to use checksums
0625db53cd9a7c635f0e0a6a4b90643699be7b5aceb9ed86053538cd968fff53
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.5

Security for baihu-discord-logger 0.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page