BetterLogger is a simple and powerful logging package that makes it easy to display logs.
Project description
better-logger
BetterLogger is a simple and powerful logging package that makes it easy to display logs.
It runs on python 3.8 or higher and can be used in the same way as Logging.
How to Install
pip install better-loggers
Easy to use!
BetterLogger creates beautiful logs easily by writing.
For detailed source code, please click here.
from logging import StreamHandler, getLogger
import logging
from better_logger import BetterLogger
~~~~~~~~
logger = getLogger(__name__)
logger.setLevel(logging.DEBUG)
stream_handler = StreamHandler()
logger.addHandler(stream_handler)
better_logger=BetterLogger(logger)
better_logger.debug('debug message')
better_logger.debug('debug message',header_text='debug with header')
better_logger.debug('debug message',header_text='debug with traceback',use_traceback=True)
better_logger.info(very_long_response,header_text='very_long_info')
better_logger.warning('warning message')
try:
traceback_example()
except Exception as e:
better_logger.error('do not divide by zero!',exception=e,header_text=e)
better_logger.critical('重大な問題が発生しました!',exception=Exception('重大な問題が発生しました!'),header_text='CRITICAL ERROR!')
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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
File details
Details for the file better_loggers-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: better_loggers-1.0.1-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 99c0d37289eaa6408961a0a4df07b3c2947628020efa0ca78f3118d375292d6b |
|
MD5 | fcbb48d8c87ce20b1e5d85df19e787af |
|
BLAKE2b-256 | 50dee6fae772298ab2625fde95a8fa2e2df0f4d8e809f60346422b8e75a18ce9 |