Skip to main content

一个基于loguru封装的日志记录器

Project description

便捷日志工具包

当前版本0.1

说明

提供统一创建日志记录器的能力。日志记录分两种:

  1. 控制台记录器,用于调试时在控制台输出日志;
  2. 文件记录,用文件记录打印出的日志,可按日期滚动。
  • 控制台打印的日志,日志默认等级为DEBUG;
  • 文件日志记录中,支持异步写入文件

使用

pip install bwloguru

示例

  • 日志输出到控制台
from bwloguru import BwLogings
logger = BwLogings(file_handler=False).logger
logger.debug('bw nb')
  • 日志添加到文件记录器
from os.path import dirname, abspath, join
from bwloguru import BwLogings

LOG_DIR = join(dirname(dirname(abspath(__file__))), 'log')
logger = BwLogings( log_dir=LOG_DIR).logger
logger.info('test')

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

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

Source Distribution

bwloguru-0.1.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

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

bwloguru-0.1-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

Details for the file bwloguru-0.1.tar.gz.

File metadata

  • Download URL: bwloguru-0.1.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.8.16

File hashes

Hashes for bwloguru-0.1.tar.gz
Algorithm Hash digest
SHA256 697a4bb1aedab768dc023531154ccb33c1c78e717feb75ff667c45509efbb50f
MD5 77cfef3711ff7e4d12b4afbd77be4d94
BLAKE2b-256 1b40b3a18fb19eca7156ba59176e677e1db56dd210a8db994cadeab62281a19e

See more details on using hashes here.

File details

Details for the file bwloguru-0.1-py3-none-any.whl.

File metadata

  • Download URL: bwloguru-0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.8.16

File hashes

Hashes for bwloguru-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f1860e78f786ca5011d9917a3bc33b8ab02d20f4f28840815424969be32fafbf
MD5 baac31834dc0cf4a7f01f428074b6c5f
BLAKE2b-256 d76a5f849127b4d7a6ae3cb11b70dbec769396481eeb8cf3bf76640e59024a7e

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