Skip to main content

nlogging

Description

nlogging is a Python package for a Simple logging Liblary.

Installaction

pip install nlogging

Usage

from nlogging import nLogging
from nlogging import DEBUG, INFO, WARNING, ERROR, CRITICAL, NOOUT


def subfunc1():
	logging.output(DEBUG, 'message for debugging.')
	logging.output(CRITICAL, 'message for critical!')

def subfunc2():
	logging.output(DEBUG, 'message for debugging.')
	logging.output(CRITICAL, 'message for critical!')


# Initializing for nLogging
logging = nLogging('YourLoggerName', './sample.log')
logging.set_out_level(stream_lv=DEBUG, file_lv=DEBUG)

logging.output(DEBUG, 'message for debugging.')
logging.output(CRITICAL, 'message for critical!')


# You can chang log-lv(stream_lv: DEBUG -> INFO, file_lv: DEBUG -> INFO)
logging.set_out_level(stream_lv=INFO, file_lv=INFO)
subfunc1()

# You can chang log-lv(stream_lv: INFO -> NOOUT, file_lv: INFO -> WARNING)
logging.set_out_level(stream_lv=NOOUT, file_lv=WARNING)
subfunc2()

Result(stream)

2024/03/17 18:18:29.602 DEBUG    exsample.py(18) [<module>] message for debugging.
2024/03/17 18:18:29.602 CRITICAL exsample.py(19) [<module>] message for critical!
2024/03/17 18:18:29.602 CRITICAL exsample.py(7) [subfunc1] message for critical!

Result(file)

2024/03/17 18:18:29.602 DEBUG    exsample.py(18) [<module>] message for debugging.
2024/03/17 18:18:29.602 CRITICAL exsample.py(19) [<module>] message for critical!
2024/03/17 18:18:29.602 CRITICAL exsample.py(7) [subfunc1] message for critical!
2024/03/17 18:18:29.602 CRITICAL exsample.py(11) [subfunc2] message for critical!

Release files for nlogging 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nlogging 0.1.0
File Size Uploaded
nlogging-0.1.0.tar.gz 3.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nlogging 0.1.0
File Interpreter ABI Platform
nlogging-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 8.7 kB

Release files / nlogging-0.1.0.tar.gz

Download URL nlogging-0.1.0.tar.gz
Size 3.8 kB
Tags Source
SHA-256 checksum
How to use checksums
81d306a0a9b4244caef2fd00aa09c1279467e159dbd9831841eb20255b69817b
BLAKE2b-256 checksum
How to use checksums
aa24652bd70fa8a46bf35d15b2ec22f3488f787253f8b2ce5f274ce1c0b290bc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.11.7

Release files / nlogging-0.1.0-py3-none-any.whl

Download URL nlogging-0.1.0-py3-none-any.whl
Size 4.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0b453ce5e78c459d4e4c4a7b7bc1af6ee6e98d8ec6579a5638b6237e66e07e9f
BLAKE2b-256 checksum
How to use checksums
ac57294771ba31823112f388cec96dce4ca8cfbb3f17fe54752514138003d637
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.11.7

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page