Skip to main content

工具方法

Project description

utils_zihang

工具方法

安装

pip install utils_zihang

使用示例

from utils_zihang.log import setup_logger

# 示例:指定自定义日志路径

custom_log_dir = "/Users/luzihang/Desktop/LocalProjectHome/utils_zihang/log"
log = setup_logger(app_name="my_app", env="DEV", log_dir=custom_log_dir)
log.info("这是一条信息日志")

import uuid
trace_id = str(uuid.uuid4())
log.bind(trace=trace_id).info("这是一条带有trace的信息日志")
log.bind(trace=trace_id, analysis=True).info("这是一条带有trace和analysis的信息日志")
log.bind(analysis=True).info("这是一条带有analysis的信息日志")

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

utils_zihang-0.0.4.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

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

utils_zihang-0.0.4-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file utils_zihang-0.0.4.tar.gz.

File metadata

  • Download URL: utils_zihang-0.0.4.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.6

File hashes

Hashes for utils_zihang-0.0.4.tar.gz
Algorithm Hash digest
SHA256 3e4d930ae96c8bfb05164a195bce5f93ec79943b8910d59d48822d100fe09741
MD5 9137ae16d9066f0124fbc11c05d0de4f
BLAKE2b-256 babdc4e77dbd7ab155c6aa1c2da5e9a8848b3808cc104bdcc46daf32abf4ff4d

See more details on using hashes here.

File details

Details for the file utils_zihang-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: utils_zihang-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 6.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.6

File hashes

Hashes for utils_zihang-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 b4c8d2bbb0dca6b903f637bba13f96d34f80055e6abc1ae677ac73c91c02c74b
MD5 71f9bbc66537b6b9b5acd3b3a9c74a30
BLAKE2b-256 7294ffdde5ec191120a7df4c1a071764b0ae2a6945698c8e78839b0ab648a934

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