Skip to main content

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. Screenshot 2024-03-25 at 2 10 38

How to Install

pip install better-logger

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


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

better_loggers-1.0.0-py3-none-any.whl (4.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page