Python client for Zlogger logging service
Project description
Zlogger Python Client
Ein einfacher und effizienter Python-Client für den Zlogger Service.
Installation
pip install zlogger
Schnellstart
from zlogger import ZloggerClient
# Client initialisieren
logger = ZloggerClient(
endpoint="https://zlogger.ch/api/logs",
api_key="your-api-key",
app_name="my-app"
)
# Logs senden
logger.info("Application started", {"version": "1.0.0"})
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)
Erstellt einen neuen Zlogger-Client.
Parameter:
endpoint(str): Zlogger API Endpointapi_key(str): Ihr Zlogger API-Schlüsselapp_name(str): Name Ihrer Anwendung
Log-Methoden
Alle Log-Methoden akzeptieren:
message(str): Die Log-Nachrichtcontext(dict, optional): Zusätzliche Kontext-Daten
Verfügbare Methoden:
logger.debug(message, context=None)logger.info(message, context=None)logger.warn(message, context=None)logger.error(message, context=None)
Beispiel mit Kontext
logger.error("Payment failed", {
"transaction_id": "txn_123",
"amount": 99.99,
"currency": "USD",
"error_code": "INSUFFICIENT_FUNDS"
})
Lizenz
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.0.tar.gz
(3.3 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.0.tar.gz.
File metadata
- Download URL: zlogger_client-1.0.0.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
394fabf8140b8de84737fb42b3c5b539fac2577c426f963ced17e6da2f341ace
|
|
| MD5 |
5c98d6f957955f44f03c07a12a35ae87
|
|
| BLAKE2b-256 |
3527cac6a1a21542a1d0fc217b0de71ccf87584f06ea70b03fac87919d4e0d38
|
File details
Details for the file zlogger_client-1.0.0-py3-none-any.whl.
File metadata
- Download URL: zlogger_client-1.0.0-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 |
2f0aeb0263d8f1258fae47c890b5840655477d947f3bf5334f8ccf5f6d324e9c
|
|
| MD5 |
dbf893ae90bc30f731c056634faf9083
|
|
| BLAKE2b-256 |
15a6c8292fc31c37559dd4cc562674a8ed4024c00da6671cc02baf04404d67d0
|