Skip to main content

一个开箱即用的 log 解决方案

Project description

XPyLogger

By 这里是小邓

介绍

XPyLog 是提供了一个开箱即用的日志库,较好的解决了Python 自带 logging 库使用繁琐,函数玄学的问题,支持 rich 库彩色输出。

依赖

  1. Python (3.9+)
  2. Rich

编译步骤

GIT

  1. 克隆 XLOGGER
  2. 放入程序文件夹
  3. 安装rich
pip install rich
  1. from XPyLogger import *

PIP(推荐)

pip install XPyLogger

Demo

import XPyLogger as log
log.log("Hello world!")
log.close()

函数介绍

XPyLogger.log(msg, level = INFO, sender = SENDER_MAIN)

输出一条日志

  • msg:log信息
  • level:日志等级
  • sender:发送者

XPyLogger.close()

关闭日志本地记录文件

XPyLogger.INFO

日志等级-信息

XPyLogger.WARN

日至等级-警告

XPyLogger.ERR

日志等级-错误

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

XPyLogger-1.2.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

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

XPyLogger-1.2-py3-none-any.whl (2.6 kB view details)

Uploaded Python 3

File details

Details for the file XPyLogger-1.2.tar.gz.

File metadata

  • Download URL: XPyLogger-1.2.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.1 importlib-metadata/4.8.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2

File hashes

Hashes for XPyLogger-1.2.tar.gz
Algorithm Hash digest
SHA256 1a63afaf63e57e5d1a61026bb07c1c7ebabeb6bd0ffd8af9328dbe7058291557
MD5 3307ac1e3cff4cb3f457aa83763b651a
BLAKE2b-256 eb67e11b4a65d615dfbef8ded7db4eae589a35317eea8e87eec0a5031b11aceb

See more details on using hashes here.

File details

Details for the file XPyLogger-1.2-py3-none-any.whl.

File metadata

  • Download URL: XPyLogger-1.2-py3-none-any.whl
  • Upload date:
  • Size: 2.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.1 importlib-metadata/4.8.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2

File hashes

Hashes for XPyLogger-1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0704600378f2c461c151905bb1f1604d46731c88402b3e2ad1fb3ab1213a7f08
MD5 b7bad325a312e064830eacec68f10a2e
BLAKE2b-256 4bbd76f09a4aa721ff6fe508638ee8c662bd97b76383fb06a9cacb2f0221c4bd

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