Skip to main content

A colorful logger for python3.

Project description

python-logger

Colorful logger for python3

How to use

Install

pip install colorful-logger

Usage

You can directly use the default logger, the colored logs will be printed on the terminal, and the default logger level is warning.

from colorful_logger.logger import logger

logger.warning("This is a warning message.")

You can also change the log level, save the log to a file, change the logger name, and the log may not be output to the terminal.

import logging
from colorful_logger.logger import get_logger

logger = get_logger(name="logger", level=logging.INFO, show=False, file_path="./test.log")

logger.info("This is a info message.")
logger.warning("This is a warning message.")
logger.error("This is a error message.")
logger.fatal("This is a fatal message.")

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

colorful_logger-0.0.1-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file colorful_logger-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: colorful_logger-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.2

File hashes

Hashes for colorful_logger-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bd338fd95fc38e54bcc391acb67814968a16026717d5f8feb9a2450487b7c037
MD5 f93996841aeeaf8b4a860a09409af554
BLAKE2b-256 998d382f98625469a5889b754e70f377914c5984134c299b089fe772346b3e5f

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