https://github.com/bobthebuidler/lazy_logging
https://github.com/bobthebuidler/lazy_logging
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/bobthebuidler/lazy_logging
- Owner: BobTheBuidler
- License: mit
- Created: 2022-05-05T23:28:42.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2022-05-17T22:39:52.000Z (about 3 years ago)
- Last Synced: 2025-03-06T01:16:31.137Z (4 months 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.