You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

minilog

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

minilog

Minimalistic wrapper for Python logging.

2.3.1
pipPyPI
Maintainers
1

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.

Keywords

logging

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts