No project description provided
Project description
loguwant
It's a Python package that enables you to log only what you want. It creates logger, using which you can see the logs of the modules written by you separately.
For this we have to defined log level of root logger and log Level of the modules you write and whose logs you want to print as environment variables ROOT_LOG_LEVEL and CURRENT_LOG_LEVEL respectively.
We can also switch this functionality by using LOG_DEPTH environment variable.
uses
export ROOT_LOG_LEVEL=DEBUG
export CURRENT_LOG_LEVEL=DEBUG
export LOG_DEPTH=current
from loguwant import logger
logger = logger.get_logger()
def example_function():
try:
print('It is an example function to show working of loguwant package')
logger.debug(logger.prepare_log('It is an debug log'))
logger.info(logger.prepare_log('It is an info log'))
logger.warning(logger.prepare_log('It is an warning log'))
except Exception as err:
logger.error(logger.prepare_exception_log('It is an error log'))
output
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
loguwant-0.0.3.tar.gz
(3.6 kB
view details)
File details
Details for the file loguwant-0.0.3.tar.gz
.
File metadata
- Download URL: loguwant-0.0.3.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6d4c9eebf299a77a1bc3d7bfe74c2d19af393dac24b17f47dae4e58f2d848795 |
|
MD5 | cd74710625fee946fbbd4e056f16cc61 |
|
BLAKE2b-256 | d1446a62211cf570159626e5b37813601c44771fba26d6607d8750092e5e111e |