← All tools

2ning

Popularity 55 Updated Development & Build

Colorful and customizable logging module for CLI applications.

pypiauto-collected

Installation

A directly usable install command is not verified yet. Check the project documentation or releases.

Tune your logs

<p align="center" <img src="./docs/logo.png" alt="tuning icon" width=500 </p

tuning is a colorful and customizable dual-logging module for CLI applications. Emojis included 😉.

The idea is simple, display human-readable and colorful terminal logs, while keeping file logs detailed and sober.

It builds on stdlib logging and Rich, so you can use it as usual:

  • logging via named functions: logger.mycustomlvl()
  • natural language defined styles: bold italic white on red

Features

Easy to use

  • Stdlib-like root logger configuration through basicConfig(), including rotating logs.
  • YAML-driven configuration (we got your back with the defaults)

Fully customizable

  • Logging levels: icon, symbol, and style. (already added TRACE and SUCCESS)
  • Colorful console output, with optional information: timestamp and path (caller file).
  • Styled interactive prompts, with default value: logger.prompt(...)
  • Custom app banners through banner(...)
  • Inside-of-the-box: experimental display mode which encloses console records into boxes. Beautiful, but

Optional extras are available for CLI and TUI integrations, but tuning does not wrap Typer or Textual.

Install

pip install 2ning

For local development:

git clone https://github.com/octanima-labs/tuning
cd tuning
pip install -e ".[dev,cli,tui,docs]"

Quick Start

import tuning

logger = tuning.getLogger(__name__)

logger.info("application started")
logger.success("everything looks good")

name = logger.prompt("Your name?")
logger.info("hello %s", name)