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.

Files for minilog, version 2.0
Filename, size File type Python version Upload date Hashes
Filename, size minilog-2.0-py3-none-any.whl (8.4 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size minilog-2.0.tar.gz (7.1 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page