Skip to main content

Minimalistic wrapper for Python logging.

Project description

minilog

A minimalistic logging wrapper for Python.

Unix Build Status Windows Build Status Coverage Status Scrutinizer Code Quality PyPI Version PyPI License

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.

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.0b2.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

minilog-2.0b2-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file minilog-2.0b2.tar.gz.

File metadata

  • Download URL: minilog-2.0b2.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.10 CPython/3.7.2 Darwin/19.6.0

File hashes

Hashes for minilog-2.0b2.tar.gz
Algorithm Hash digest
SHA256 83a9790e4c7bbc9c8bf7bfe81dcbfe66a3e892d683901a9b223c3d1848b43d1a
MD5 429239e4dab1f27ac082e810a91976e4
BLAKE2b-256 e13f46b967519f9a7649e8f8d179217ba569da5f12926b68c8d84b1e8cb7bbfd

See more details on using hashes here.

File details

Details for the file minilog-2.0b2-py3-none-any.whl.

File metadata

  • Download URL: minilog-2.0b2-py3-none-any.whl
  • Upload date:
  • Size: 8.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.10 CPython/3.7.2 Darwin/19.6.0

File hashes

Hashes for minilog-2.0b2-py3-none-any.whl
Algorithm Hash digest
SHA256 3a9c0e808ad1647279b56dd7fe4ff4fff2fd7db99b736e43f9f4375f18cab983
MD5 87d178684a1c9f7d95f9afa4d5101922
BLAKE2b-256 6939dcb9f1a35681f61984a214aacd157403e57c90d8c4be665ca9f9c832bff3

See more details on using hashes here.

Supported by

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