Skip to main content
Warning: You are using the test version of PyPI. This is a pre-production deployment of Warehouse. Changes made here affect the production instance of TestPyPI (testpypi.python.org).
Help us improve Python packaging - Donate today!

DNIF Logging Client Library

Project Description

This is the official Python DNIF client library. This allows you to directly write log statements into your application code and integrate it with DNIF Adapters.

Installation

You can download the library using pip, as:

$ pip install dnif-logger

Getting Started

The DNIF library currently supports two ingestion mechanisms: 1. TCP protocol uploads using the HTTP(S) endpoint 2. Uploads using the UDP protocol

Typical usages for both of these are given below.

TCP

from dnif.consumer import AsyncHttpConsumer
from dnif.logger import DnifLogger
dlog = DnifLogger(AsyncHttpConsumer('http://TARGET_IP:PORT/json/receive'))
dlog.log({'key': 'value'})

The AsyncHttpConsumer is thread-safe, so you can use the same instance across threads (recommended).

UDP

from dnif.consumer import AsyncUDPConsumer
from dnif.logger import DnifLogger
dlog = DnifLogger(AsyncUDPConsumer('UDP_IP', UDP_PORT))
dlog.log('Hello World')

The AsyncUDPConsumer is thread-safe, so you can use the same instance across threads (recommended).

Release History

Release History

This version
History Node

0.1.1

History Node

0.1.0

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
dnif_logger-0.1.1-py2.py3-none-any.whl (5.4 kB) Copy SHA256 Checksum SHA256 py2.py3 Wheel Mar 30, 2017
dnif-logger-0.1.1.tar.gz (4.0 kB) Copy SHA256 Checksum SHA256 Source Mar 30, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting