Skip to main content

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 Endpoint
  • api_key (str): Ihr Zlogger API-Schlüssel
  • app_name (str): Name Ihrer Anwendung

Log-Methoden

Alle Log-Methoden akzeptieren:

  • message (str): Die Log-Nachricht
  • context (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.4.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

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

zlogger_client-1.0.4-py3-none-any.whl (3.1 kB view details)

Uploaded Python 3

File details

Details for the file zlogger_client-1.0.4.tar.gz.

File metadata

  • Download URL: zlogger_client-1.0.4.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

Hashes for zlogger_client-1.0.4.tar.gz
Algorithm Hash digest
SHA256 ac659a03586867e950ca05098d0e293ea838fa73ffbf9afb3595adaa567ab122
MD5 1429954eea5732ffd7d37f26d80df7e6
BLAKE2b-256 9d57135fd4a98627592a94bf4da3b3fb0404bbb70b7871fecdc04012ecd65d41

See more details on using hashes here.

File details

Details for the file zlogger_client-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: zlogger_client-1.0.4-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

Hashes for zlogger_client-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 1292981592f739697b9efe7d8c67de5f7b148247a636e48acd9cd4a06ea428fa
MD5 833f8c6117ee773a6937b65b5fada4a6
BLAKE2b-256 c5ff7eb1a98f01f14595615eca6c3305165a86d06feffc6ab1cb14c12ab769df

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