Skip to main content

dnif-logger

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).

Metadata

Release files for dnif-logger 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dnif-logger 1.0.1
File Size Uploaded Provenance Actions
dnif-logger-1.0.1.tar.gz 4.5 kB Without provenance Details for dnif-logger-1.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for dnif-logger 1.0.1
File Interpreter ABI Platform Actions
dnif_logger-1.0.1-py2.py3-none-any.whl Python 3, Python 2 none any Details for dnif_logger-1.0.1-py2.py3-none-any.whl

Total release size: 10.7 kB

Release files / dnif-logger-1.0.1.tar.gz

Download URL dnif-logger-1.0.1.tar.gz
Size 4.5 kB
Tags Source
SHA-256 checksum
How to use checksums
b3af518ac423073a76719ca240f7205d1cc297349b0a2e6faf3c8ba2c80b7db4
BLAKE2b-256 checksum
How to use checksums
b2080c9faa7615e44c94de6b67f1f2bf06f3ecf0f2e92f1e1688c403ca246ed7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / dnif_logger-1.0.1-py2.py3-none-any.whl

Download URL dnif_logger-1.0.1-py2.py3-none-any.whl
Size 6.1 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
e314d4157b3b9b33bd76daae1ba38e8c7be4efd2f5320ef4bb994ada9912ccaa
BLAKE2b-256 checksum
How to use checksums
1a74e6652fb393718345fa6cca3eaf41595d3a79b9fd02ddac4c83c47396bd09
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for dnif-logger 1.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page