Skip to main content

Python client for VictoriaLogs integration

Project description

LogVictoriaLogs

Python client library for integrating with VictoriaLogs, a high-performance log database and search solution.

Features

  • Easy integration with VictoriaLogs
  • Support for multiple logging protocols (HTTP, Syslog)
  • Automatic caller information capture
  • Python logging module integration
  • Structured logging with rich context information

Installation

pip install LogVictoriaLogs

Usage

Basic Usage

from LogVictoriaLogs import VictoriaLogsClient

# Create client instance
client = VictoriaLogsClient("victorialogs-host", 9428, 514)

# Send basic logs
client.send_logs([
    {"message": "Hello VictoriaLogs", "level": "info", "service": "my-service"}
])

# Log with context information
client.log_with_context(
    "User login successful",
    level="info",
    service="auth-service",
    user_id="123",
    ip_address="192.168.1.1"
)

Python Logging Integration

import logging
from LogVictoriaLogs import VictoriaLogsClient

# Create client
client = VictoriaLogsClient("victorialogs-host", 9428, 514)

# Configure logging
logger = logging.getLogger("MyApp")
logger.setLevel(logging.INFO)

# Add VictoriaLogs handler
handler = client.setup_logging_handler(service="my-application")
logger.addHandler(handler)

# Use standard logging
logger.info("Application started")
logger.error("Something went wrong")

License

MIT

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

logvictorialogs-0.1.0.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

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

logvictorialogs-0.1.0-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file logvictorialogs-0.1.0.tar.gz.

File metadata

  • Download URL: logvictorialogs-0.1.0.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.0

File hashes

Hashes for logvictorialogs-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7d51d02f046e532cac94f489ebde186eece573868443b915592dcddbfe1c53bf
MD5 af2a7e17bcdd398434a4d1dfd15bc795
BLAKE2b-256 435117e8dd868509cfb73caeafecba566955f86ceeffdac911fe120a141f0496

See more details on using hashes here.

File details

Details for the file logvictorialogs-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for logvictorialogs-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b99736ce5905f4dc28bcafd4b4f12204dab81bd25cbc4b76c36cb7000a20ac4e
MD5 56c669a494bc52c6de6c02e8ac367347
BLAKE2b-256 e1f01702e0433bc1c280ecf75687d5a49378f7cf313f3d860d8888f160ccebc2

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