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 hashes)
Built Distribution
slf4py-0.0.4-py3-none-any.whl
(2.5 kB
view hashes)