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-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


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.1-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file better_loggers-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for better_loggers-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 99c0d37289eaa6408961a0a4df07b3c2947628020efa0ca78f3118d375292d6b
MD5 fcbb48d8c87ce20b1e5d85df19e787af
BLAKE2b-256 50dee6fae772298ab2625fde95a8fa2e2df0f4d8e809f60346422b8e75a18ce9

See more details on using hashes here.

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