Skip to main content

A colorful logger for Python's applications.

Project description

Colorful logger for application

I. Installation

1. You can easily install it from pypi:

pip install hien_logger

2. Or you can also install it from source:

git clone https://github.com/hienhayho/hien_logger.git

cd hien_logger/

pip install -v .

Optional:

  • To make sure hien_logger was sucessfully installed, run this:
pip install pytest

pytest

II. Usage

  • You can use it as a console logger:
from hien_logger import get_formatted_logger

logger = get_formatted_logger(name="hien_logger")

logger.info("Hello World")
  • Or you can log it to a file:
from hien_logger import get_formatted_logger

logger = get_formatted_logger(
    name="hien_logger",
    file_path="test.log"
)

logger.info("Hello World")
  • You can set datetime to your timezone:
from hien_logger import setup_timezone

setup_timezone("Asia/Ho_Chi_Minh")

III. LICENSE

hien_logger is under MIT LICENSE.

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

If you're not sure about the file name format, learn more about wheel file names.

hien_logger-0.0.2.4-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file hien_logger-0.0.2.4-py3-none-any.whl.

File metadata

  • Download URL: hien_logger-0.0.2.4-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.7

File hashes

Hashes for hien_logger-0.0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 f5a95ed2a4158fecafab592fabe5a9a55aa6d3b99e1100fdb8e706b46239b836
MD5 018ddfeb209411e7843324c3b63d57b4
BLAKE2b-256 1881663898292c56f677072697a76ceb929f26c3fcfe14889eed47f0b3150948

See more details on using hashes here.

Supported by

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