Colorful logger
🔧 I. Installation
1. You can easily install it from pypi:
pip install hien_logger
2. You can also install it from source:
pip install git+https://github.com/hienhayho/hien_logger.git
- Or
git clone https://github.com/hienhayho/hien_logger.git
cd hien_logger/
pip install -v .
# Optional: Test if installed successfully.
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 include date of this file log with
include_date=True. Then the date will be included in file log name.
from hien_logger import get_formatted_logger
logger = get_formatted_logger(
name="hien_logger",
file_path="test.log",
include_date=True
)
logger.info("Hello World")
- Log all to one global file:
from hien_logger import get_formatted_logger
logger = get_formatted_logger(
name="hien_logger",
global_file_log=True
)
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.
Metadata
Release files for hien-logger 0.0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hien_logger-0.0.3.1-py3-none-any.whl | Python 3 | none | any | Details for hien_logger-0.0.3.1-py3-none-any.whl |
Release files / hien_logger-0.0.3.1-py3-none-any.whl
| Download URL | hien_logger-0.0.3.1-py3-none-any.whl |
|---|---|
| Size | 5.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cc0b3ebd10a2450affee6d08d0b1144f56cd69951d11f0c3faeaecb84f1da632
|
|
BLAKE2b-256 checksum How to use checksums |
f96d13815a6bfdb8177d2e9acda1362891f174491521fd097729fb4d9613b58f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.12.7
|
Security for hien-logger 0.0.3.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.