Skip to main content

Meowthpxnk python logging util

Logger installing

  1. Create configuration file config/logging.yaml You can configurate with default formatters and loggers in python default logger.
version: 1
disable_existing_loggers: False

formatters:
    simple:
        (): mpxnk_logging.logging.formatters.BaseFormatter
        settings:
            module: True

    colorized:
        (): mpxnk_logging.logging.formatters.ColorisedFormatter
        settings:
            module: True
            log_path: True

    colorized.module:
        (): mpxnk_logging.logging.formatters.ColorisedFormatter
        settings:
            module: True

handlers:
    console:
        class: logging.StreamHandler
        level: DEBUG
        formatter: colorized
        stream: ext://sys.stdout

    console.module:
        class: logging.StreamHandler
        level: DEBUG
        formatter: colorized.module
        stream: ext://sys.stdout

    file:
        class: logging.FileHandler
        level: INFO
        formatter: simple
        filename: LOGGING.LOG

loggers:
    uvicorn:
        level: INFO
        handlers: [console.module, file]

    alembic:
        level: INFO
        handlers: [console.module, file]

    app:
        level: INFO
        handlers: [console, file]

    app.api:
        level: ERROR
  1. Install yaml
poetry add pyyaml
  1. Create yaml reading function
def read_file(path: str) -> str:
    with open(path, encoding="utf-8") as file:
        return file.read()


def read_yaml(path: str) -> dict:
    return yaml.safe_load(read_file(path))
  1. Setup logger
LOGGING_CONFIG = read_yaml("config/logging.yaml")
logging.config.dictConfig(LOGGING_CONFIG)
  1. Gratz! You can test your logs
logger = logging.getLogger("app")
logger.info("Startup application")

$XOXO$ meowthpxnk ..

Metadata

Release files for mpxnk-logging 1.0.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 mpxnk-logging 1.0.0
File Size Uploaded Provenance Actions
mpxnk_logging-1.0.0.tar.gz 3.7 kB With provenance Details for mpxnk_logging-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mpxnk-logging 1.0.0
File Interpreter ABI Platform Actions
mpxnk_logging-1.0.0-py3-none-any.whl Python 3 none any Details for mpxnk_logging-1.0.0-py3-none-any.whl

Total release size: 7.6 kB

Release files / mpxnk_logging-1.0.0.tar.gz

Download URL mpxnk_logging-1.0.0.tar.gz
Size 3.7 kB
Tags Source
SHA-256 checksum
How to use checksums
6052c7b69c2d7ddb9a6a14883846e2e42c8f74b49170713563ea02971e214955
BLAKE2b-256 checksum
How to use checksums
73c13534b08e94efed2a8815569dc1c28552c31f60d29baa5a841d848a92b626
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 9, 2026.

Transparency log

Release files / mpxnk_logging-1.0.0-py3-none-any.whl

Download URL mpxnk_logging-1.0.0-py3-none-any.whl
Size 3.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
901a588effaa2d1c29aede83f2baaf6294dc37a9cede9856ec56a3683bd4ef4d
BLAKE2b-256 checksum
How to use checksums
86f899019b627a6f92bf36b0472160231af5846bfae1fb466b95b3fc96599be5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 9, 2026.

Transparency log

Security for mpxnk-logging 1.0.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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for mpxnk_logging-1.0.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 9, 2026.

Transparency log

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

1.0.0 This release

2 release files Full 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