Skip to main content

logfn-python

Structured logging for Python with pluggable pipelines and transports.

Features

  • Structured Logging: JSON-based log events with consistent schema
  • Log Levels: trace, debug, info, warn, error, fatal
  • Child Loggers: Create scoped loggers with inherited context
  • Pipeline Stages: Pluggable event processing (redaction, enrichment, sampling)
  • Multiple Sinks: Console (pretty/JSON), HTTP (batched with retry)
  • Type Hints: Fully typed with Python type hints

Installation

pip install logfn

Quick Start

from logfn import dev_logger

logger = dev_logger("my-app")

logger.info("Application started", version="1.0.0")
logger.warn("Deprecated API used", api="/old-endpoint")
logger.error("Request failed", status_code=500, path="/api/users")

Basic Usage

Creating a Logger

from logfn import create_logger, SinkConsole

logger = create_logger(
    name="my-service",
    level="info",
    sinks=[SinkConsole(json=True)],
)

logger.info("User logged in", user_id="123", email="user@example.com")

Metadata

Release files for logfn 0.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 logfn 0.0.1
File Size Uploaded Provenance Actions
logfn-0.0.1.tar.gz 8.9 kB Without provenance Details for logfn-0.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for logfn 0.0.1
File Interpreter ABI Platform Actions
logfn-0.0.1-py3-none-any.whl Python 3 none any Details for logfn-0.0.1-py3-none-any.whl

Total release size: 16.9 kB

Release files / logfn-0.0.1.tar.gz

Download URL logfn-0.0.1.tar.gz
Size 8.9 kB
Tags Source
SHA-256 checksum
How to use checksums
5a4cbb4c5ad74e65113e2dde0290f8b11cf6601228e7bc48d43c5db08266322a
BLAKE2b-256 checksum
How to use checksums
d9f2e2394e8e0bf67647472e704129d35b8bbde82a0f7d3dc14cdc9d191d2930
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / logfn-0.0.1-py3-none-any.whl

Download URL logfn-0.0.1-py3-none-any.whl
Size 8.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
158c65e79e6ac3a0e04781f48614ed4212b2512c61624b86495610dc02483337
BLAKE2b-256 checksum
How to use checksums
61d69e38508afc7d4769c4b4ef384653a3499a510384bda591f28a7ec6b19a54
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Security for logfn 0.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.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files No provenance

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