Python client for Zlogger logging service
Project description
Zlogger Python Client
A simple and efficient Python client for the Zlogger logging service.
Installation
pip install zlogger-client
Quick Start
from zlogger import ZloggerClient
# Initialize client
logger = ZloggerClient(
endpoint="https://zlogger.ch/api/logs",
api_key="your-api-key",
app_name="my-app"
)
# Send logs
logger.info("Application started", {"version": "1.0.4"})
logger.warn("High memory usage", {"memory": "90%"})
logger.error("Database connection failed", {"db": "primary"})
logger.debug("Processing user request", {"user_id": 123})
API
ZloggerClient(endpoint, api_key, app_name)
Creates a new Zlogger client instance.
Parameters:
endpoint(str): Zlogger API endpoint URLapi_key(str): Your Zlogger API keyapp_name(str): Name of your application
Logging Methods
All logging methods accept:
message(str): The log messagecontext(dict, optional): Additional context data
Available methods:
logger.debug(message, context=None)logger.info(message, context=None)logger.warn(message, context=None)logger.error(message, context=None)
Example with Context
logger.error("Payment failed", {
"transaction_id": "txn_123",
"amount": 99.99,
"currency": "USD",
"error_code": "INSUFFICIENT_FUNDS"
})
License
MIT License
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
zlogger_client-1.0.5.tar.gz
(3.2 kB
view details)
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 zlogger_client-1.0.5.tar.gz.
File metadata
- Download URL: zlogger_client-1.0.5.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c9c9d7151776017f188c99aeafb2c210d1c800476152b400180028478184603
|
|
| MD5 |
503ff00f83503c8d6bd5d2a25b7c7a6d
|
|
| BLAKE2b-256 |
8196cf5b68b353c01c8d7535a0e2aa521f66792a280cad1736ef3779215b2e6d
|
File details
Details for the file zlogger_client-1.0.5-py3-none-any.whl.
File metadata
- Download URL: zlogger_client-1.0.5-py3-none-any.whl
- Upload date:
- Size: 3.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0201ac591b82ef255579950b5d60bd3938f9778821e6b86c14aaa76d279e2a11
|
|
| MD5 |
505e41fa859ebe0b44ec95f42600a991
|
|
| BLAKE2b-256 |
2c602984941a9ce82b259f4335152236be862580d9bc13cfb8f48d3198fc4de9
|