Skip to main content

Minimalistic wrapper for Python logging.

Project description

minilog

A minimalistic logging wrapper for Python.

Linux Build Windows Build Code Coverage Scrutinizer Code Quality PyPI License PyPI Version PyPI Downloads

Usage

Every project should utilize logging, but for simple use cases, this requires a bit too much boilerplate. Instead of including all of this in your modules:

import logging

log = logging.getLogger(__name__)

def greet(name):
    log.info("Hello, %s!", name)

if __name__ == "__main__":
    logging.basicConfig(
        level=logging.INFO,
        format="%(levelname)s: %(name)s: %(message)s",
    )

with this package you can simply:

import log

def greet(name):
    log.info("Hello, %s!", name)

if __name__ == "__main__":
    log.init()

It will produce the exact same standard library logging records behind the scenes with automatic formatting for non-strings.

Installation

Install this library directly into an activated virtual environment:

$ pip install minilog

or add it to your Poetry project:

$ poetry add minilog

Documentation

To view additional options, please consult the full documentation.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

minilog-2.3.1.tar.gz (7.4 kB view details)

Uploaded Source

Built Distribution

minilog-2.3.1-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

Details for the file minilog-2.3.1.tar.gz.

File metadata

  • Download URL: minilog-2.3.1.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.11.7 Darwin/23.6.0

File hashes

Hashes for minilog-2.3.1.tar.gz
Algorithm Hash digest
SHA256 4b602572c3bcdd2d8f00d879f635c0de9e632d5d0307e131c91074be8acf444e
MD5 5819301bc36a9117db170ad7cb5c910f
BLAKE2b-256 e3c96d4dc9bcd4b97ed89f482eeec0e6bb025942744689215dc2a4ed50415ea4

See more details on using hashes here.

File details

Details for the file minilog-2.3.1-py3-none-any.whl.

File metadata

  • Download URL: minilog-2.3.1-py3-none-any.whl
  • Upload date:
  • Size: 9.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.11.7 Darwin/23.6.0

File hashes

Hashes for minilog-2.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1a679fefe6140ce1d59c3246adc991f9eb480169e5a6c54d2be9023ee459dc30
MD5 9dc74cbd791de6e736559b413ecb40e1
BLAKE2b-256 bc33731b5be35c83268725451d25eeac78fa0625e9d0c8f115ad3b1e5173737f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page