Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bobthebuidler/lazy_logging
https://github.com/bobthebuidler/lazy_logging
Last synced: 17 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/bobthebuidler/lazy_logging
- Owner: BobTheBuidler
- License: mit
- Created: 2022-05-05T23:28:42.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-05-17T22:39:52.000Z (over 2 years ago)
- Last Synced: 2024-11-22T05:49:01.280Z (about 1 month ago)
- Language: Python
- Size: 7.81 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: license
Awesome Lists containing this project
README
Debug logging for lazy people.
'''
import logging
logger = logging.getLogger(__name__)@LazyLogger(logger)
def something():
' i do something '
return
'''What's a LazyLoggerFactory?
"""
from lazy_logging import LazyLogger, LazyLoggerFactoryexampleLazyLogger = LazyLoggerFactory("EXAMPLE")
@exampleLazyLogger(logger)
def my_function_a():
pass@LazyLogger(logger,"EXAMPLE")
def my_function_b():
passmy_function_a == my_function_b
"""You can set the logger level for both loggers with env var LL_LEVEL_EXAMPLE.