Python Logging Handler

Drop-in logging.Handler that ships records to BunnyLogs in a background thread — no blocking, no extra dependencies beyond certifi.

Installation
pip install bunnylogs
Quick start
import logging
from bunnylogs import BunnyLogsHandler

logging.getLogger().addHandler(BunnyLogsHandler("<uuid>"))

logging.warning("something went wrong")
Full example
import logging
from bunnylogs import BunnyLogsHandler

logger = logging.getLogger("my-app")
logger.setLevel(logging.DEBUG)
logger.addHandler(BunnyLogsHandler("<uuid>"))

logger.info("server started")
logger.warning("disk usage above 80 %%")
logger.error("unhandled exception", exc_info=True)
Constructor parameters
Parameter Default Description
uuid required The logspace UUID from your BunnyLogs stream URL.
level logging.NOTSET Minimum log level to forward. Records below this level are silently dropped.
endpoint https://bunnylogs.com Base URL of the BunnyLogs instance. Override for self-hosted deployments.
timeout 5 HTTP request timeout in seconds.
Notes
  • Records are placed on an in-process queue and flushed by a daemon thread, so emit() returns in microseconds.
  • Call handler.close() (or logging.shutdown()) before your process exits to flush any queued records.
  • The handler is thread-safe and can be shared across multiple loggers.
  • HTTP errors from the server are silently dropped. Network errors are reported via Python's standard logging.raiseExceptions mechanism.

bunnytail

Command-line tool to stream a logspace live in your terminal, included with the bunnylogs package.

Usage
bunnytail <name-or-uuid> [--endpoint URL]

Pass the logspace by UUID or by its human-readable name:

# by UUID (no login required for public logspaces)
bunnytail 550e8400-e29b-41d4-a716-446655440000

# by name (requires login)
bunnytail my-app-logs
Authentication

Public logspaces stream without any login. For private logspaces, bunnytail will prompt for your BunnyLogs email and password the first time:

$ bunnytail my-app-logs
Log in to https://bunnylogs.com:
  Email: you@example.com
  Password:
Logged in.
Connected. Streaming logs… (Ctrl-C to stop)

The session is saved to ~/.bunnylogs/auth (mode 600) so subsequent runs connect without prompting.

Options
Option Default Description
--endpoint URL https://bunnylogs.com Base URL of the BunnyLogs instance. Override for self-hosted deployments.
Output format

Each log entry is printed on one line. Log levels are colour-coded when the output is a terminal:

2026-04-29T12:34:56.789  INFO      my-app  server started
2026-04-29T12:34:57.012  WARNING   my-app  disk usage above 80%
2026-04-29T12:34:58.345  ERROR     my-app  unhandled exception