Skip to main content

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

Project description

XLogger

By 这里是小邓

介绍

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

项目原名 XLogger,后因重名,故改名为 XPyLogger

依赖

  1. Python (3.9+)
  2. Rich

编译步骤

GIT

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

PIP

pip install XPyLogger

函数介绍

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

输出一条日志

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

XPyLogger.close()

关闭日志本地记录文件

XPyLogger.INFO

日志等级-信息

XPyLogger.WARN

日至等级-警告

XPyLogger.ERR

日志等级-错误

Demo

import XPyLogger as log
log.log("This is a information!",log.INFO)
log.log("This is a warning!",log.WARN)
log.log("This is a error!",log.ERR)
close()

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.3.tar.gz (2.6 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.3-py3-none-any.whl (2.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: XPyLogger-1.3.tar.gz
  • Upload date:
  • Size: 2.6 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.3.tar.gz
Algorithm Hash digest
SHA256 97ee28ecf7cb6145841087bc0e488a0604a8b3bc07ca7fe8532c1ae59d97e8c5
MD5 478f10bc5541459268dc87903d13485a
BLAKE2b-256 ec13945ea2464e41e9ffd93263ab21403e99ff22c261746c3f9161fceb9b8fb2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: XPyLogger-1.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 14c7b05736c18c12cc2c4224cd1a78f4fffd914dc4a4eccd171dbeb0a797474f
MD5 8dca8210388b1c2fd15d8cd66eafbc2e
BLAKE2b-256 edbd6b3058c567f8a51948c35ec7d27533312e10645dfea371c4576b4dfc28e5

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