Skip to main content

logutil

A simple logging library that can replace builtin logging and other structural logging libaries. logutil writes logs to:

  • Console
  • Local file
  • Datadog

Basic Usage

from logutil import log

log.info("hello", a=1, b="foo")

By default, logs appear in:

  • Your console
  • Append to /tmp/app.log

Configuration

You can customize logutil by calling init_logger:

from logutil import init_logger

init_logger(
    # Turn console logging on/off
    console=True,  
    
    # Change file logging settings
    file={
        "enabled": True,
        "path": "/tmp/app.log"
    },
    
    # Enable Datadog logging
    datadog={
        "api_key": "your_api_key",
        "site": "US3",
        "service": "your_service_name",
        "tags": {"env": "dev"}
    }
)

Datadog Configuration

To use Datadog logging, you must provide:

  1. Your Datadog API key
  2. The Datadog site you use

Valid Datadog sites:

  • US1
  • US3
  • US5
  • EU1
  • US1-FED

You can find your site in the URL when you log in to the Datadog web portal.

Metadata

Release files for bfg-logutil 0.2.2

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

Source distribution (sdist)

Source distribution for bfg-logutil 0.2.2
File Size Uploaded Provenance
bfg_logutil-0.2.2.tar.gz 8.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for bfg-logutil 0.2.2
File Interpreter ABI Platform
bfg_logutil-0.2.2-py3-none-any.whl Python 3 none any Details

Total release size: 18.1 kB

Release files / bfg_logutil-0.2.2.tar.gz

Download URL bfg_logutil-0.2.2.tar.gz
Size 8.2 kB
Tags Source
SHA-256 checksum
How to use checksums
e1b97f7b67663b7c59f4871d2dfe26cd1d3c3d7a8174b7a1228fdb882af74d45
BLAKE2b-256 checksum
How to use checksums
baade0697b579f4bf0bacaa665cebdf3c899dd403d91ddcba7bebedac162cd30
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.0

Release files / bfg_logutil-0.2.2-py3-none-any.whl

Download URL bfg_logutil-0.2.2-py3-none-any.whl
Size 9.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f883d3cafd26cbcfdbc52a4ff77f233f1c13969d24dd58e74e8ac963e4f7b622
BLAKE2b-256 checksum
How to use checksums
567a5519826a1004d06fb65421e48a3385de72ca53c0f263dceea37b9f7bea25
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.0

Security for bfg-logutil 0.2.2

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