A Simple logging Liblary.
Project description
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!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
nlogging-0.1.0.tar.gz
(3.8 kB
view details)
Built Distribution
File details
Details for the file nlogging-0.1.0.tar.gz
.
File metadata
- Download URL: nlogging-0.1.0.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 81d306a0a9b4244caef2fd00aa09c1279467e159dbd9831841eb20255b69817b |
|
MD5 | d7000f91b3e69dd1d369f61501c4eea4 |
|
BLAKE2b-256 | aa24652bd70fa8a46bf35d15b2ec22f3488f787253f8b2ce5f274ce1c0b290bc |
File details
Details for the file nlogging-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: nlogging-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0b453ce5e78c459d4e4c4a7b7bc1af6ee6e98d8ec6579a5638b6237e66e07e9f |
|
MD5 | 068ca01db09df9a51fe91a331c2ab8b2 |
|
BLAKE2b-256 | ac57294771ba31823112f388cec96dce4ca8cfbb3f17fe54752514138003d637 |