Simple Logging Facade for Python
Project description
slf4py
Simple Logging Facade for Python.
How to use
# at Terminal
$ pip install slf4py
# at example.py
from slf4py import set_logger
@set_logger
class Example:
def hi(self):
self.log.info("Hello World")
e = Example()
e.hi()
# [INFO] [2024-06-04 23:50:41,355] [example.py:9] Hello World
from slf4py import create_logger
def main():
logger = create_logger()
logger.info("Hello World")
main()
# [INFO] [2024-06-04 23:50:41,355] [example.py:21] Hello World
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
slf4py-0.0.4.tar.gz
(1.8 kB
view details)
Built Distribution
File details
Details for the file slf4py-0.0.4.tar.gz
.
File metadata
- Download URL: slf4py-0.0.4.tar.gz
- Upload date:
- Size: 1.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3cfb270a3d4d55eec50d21ac0431f08db8c695be0bc1b01d620f6bc6e2bc6d37 |
|
MD5 | b993f8a71562dbf9971e92c6b169038b |
|
BLAKE2b-256 | 3a1a6d5efc87c076e868eb9dd586826c9774f82b4e947715191c2787dadbee0e |
File details
Details for the file slf4py-0.0.4-py3-none-any.whl
.
File metadata
- Download URL: slf4py-0.0.4-py3-none-any.whl
- Upload date:
- Size: 2.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 52c1c5a9cfd003f35469c2e22403e585429f48d27fa972ebf239d98d763cc854 |
|
MD5 | b8872480e95dedf6d7efa0b4f1e5d087 |
|
BLAKE2b-256 | 26df1339df63026d2b00e804d153a1e0cbcbe8817c2dc8ff7bdf341edfe0e805 |