Skip to main content

Print and save a simple log to a file

Project description

ykenan_log

Print and save a simple log to a file

This is a simple log package. You can see Github-ykenan_log

add requirements.txt

python -m pip install -r requirements.txt
py -m build
py -m twine upload --repository testpypi dist/*

Use

install

pip install coloredlogs
pip install ykenan_log

use

# -*- coding: utf-8 -*-

import ykenan_log

logger = ykenan_log.Logger("name", "log")

if __name__ == '__main__':
    print("run...")
    logger.debug("info......")
    logger.info("info......")
    logger.warn("info......")
    logger.error("info......")

output

run...
2023-03-17 09:21:36 root name[34768] DEBUG info......
2023-03-17 09:21:36 root name[34768] INFO info......
2023-03-17 09:21:36 root name[34768] WARNING info......
2023-03-17 09:21:36 root name[34768] ERROR info......

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ykenan_log-0.1.0.tar.gz (4.4 kB view hashes)

Uploaded Source

Built Distribution

ykenan_log-0.1.0-py3-none-any.whl (4.6 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