Skip to main content

Python LINZ Logger

GitHub Actions Status Kodiak Dependabot Status License Conventional Commits Code Style

Why?

LINZ has a standard logging format based loosely on the pinojs logging format:

{
  "level": 30,
  "time": 1571696532994,
  "pid": 10671,
  "hostname": "Ubuntu1",
  "id": "01DQR6KQG0K60TP4T1C4VC5P74",
  "msg": "SomeMessage",
  "v": 1
}

Usage

pip install --upgrade linz-logger
from os import environ

from linz_logger import get_log, set_level, LogLevel

set_level(LogLevel[environ.get("LOGLEVEL", "WARNING").lower()].value)
set_contextvars({"hostname": environ.get("HOSTNAME")}) # remove_contextvars(["hostname"]) to remove a key
get_log().error('Hello World', key="value")
# {"key": "value", "level": 50, "time": 1601555605017, "v": 1, "pid": 311800, "msg": "Hello World", "hostname": "Ubuntu1"}

Metadata

Release files for linz_logger 0.8.0

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

Source distribution (sdist)

Source distribution for linz_logger 0.8.0
File Size Uploaded Provenance Actions
linz_logger-0.8.0.tar.gz 4.3 kB Without provenance Details for linz_logger-0.8.0.tar.gz

Built distribution (wheel)

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

Total release size: 9.1 kB

Release files / linz_logger-0.8.0.tar.gz

Download URL linz_logger-0.8.0.tar.gz
Size 4.3 kB
Tags Source
SHA-256 checksum
How to use checksums
80b8e637500ad7219892950fa961c0d0bcb1b966842ce602d499f57a8ba17786
BLAKE2b-256 checksum
How to use checksums
8ed06285deea2904510c53c63492aa10365dd5832bab097daa8526e663aada5b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.14 CPython/3.8.13 Linux/5.15.0-1014-azure

Release files / linz_logger-0.8.0-py3-none-any.whl

Download URL linz_logger-0.8.0-py3-none-any.whl
Size 4.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a169b62fe251c80dce16adaf87285da4ea14405c031dbb56b9b90ebbab51f783
BLAKE2b-256 checksum
How to use checksums
ccdb0b26a0403abfa6c6633d46dfe32db6d83505341787cb28891363041197e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.14 CPython/3.8.13 Linux/5.15.0-1014-azure

Security for linz_logger 0.8.0

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