Skip to main content

another logger library for python

Project description

nisshi for Python

Importing the library

From pip

pip install nisshi
from nisshi import Nisshi
nisshi = Nisshi()

From source

from nisshi import Nisshi
nisshi = Nisshi()

Use

Basic logging functionality

nisshi.trace("trace message");
nisshi.debug("debug message");
nisshi.info("info message");
nisshi.warn("warn message");
nisshi.error("error message");

Can also use newline() to make an empty line. Useful for if you're outputting chunks of text (e.g. various debug messages).

nisshi.newline();

Change logging levels

Enable all logging levels:

nisshi.set_levels("all");

Disable logging:

nisshi.set_levels("none");

Toggle levels:

# disable all logging except for errors
nisshi.set_levels("none")
nisshi.set_levels({"error": true})

# enable warnings and info
nisshi.set_levels({"warn": true, "info": true})

# re-disable info
nisshi.set_levels({"info": false})

Changelog

0.1.1

made the logger actually work

i need to check my code more :skull:

0.1.0

initial release

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

nisshi-0.1.1.tar.gz (2.3 kB view details)

Uploaded Source

File details

Details for the file nisshi-0.1.1.tar.gz.

File metadata

  • Download URL: nisshi-0.1.1.tar.gz
  • Upload date:
  • Size: 2.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for nisshi-0.1.1.tar.gz
Algorithm Hash digest
SHA256 6a23c7b3d8d8b0667d177f851f48f56263eedb00d813287998dfac135c1ec695
MD5 c51af1e8833932c9040985ca2b0d52fa
BLAKE2b-256 3179bc3d7fad89d7397cbae071a796068f3ec6079865f5f135396b23a0d58079

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