Skip to main content

Flask extension of loguru

Project description

Flask-loguru

Build Status
Coverage Status
将loguru改造成flask扩展

安装方式

python setup.py install

配置参数介绍

参数 介绍 实例
LOG_PATH log输出路径 /home/work/log/web
LOG_NAME log输出的文件名称 run.log
LOG_FORMAT log输出格式 {time:YYYY-MM-DD at HH:mm:ss}
LOG_ROTATION log文件翻转时间(秒) 3600

扩展安装方式

from flask import Flask
from flask_loguru import Logger

app = Flask(__name__)

log = Logger()

log.init_app(app, {
    "LOG_PATH": "/home/work/www/log",
    "LOG_NAME": "run.log"
})

使用方法

from flask_loguru import logger

logger.critical("Critical Hello world")

logger.error("Fail Hello world")

logger.warning("Warning Hello world")

logger.info("Info Hello world")

logger.debug("Debug Hello world")

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

flask_loguru-1.0.0.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

flask_loguru-1.0.0-py2.py3-none-any.whl (7.5 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file flask_loguru-1.0.0.tar.gz.

File metadata

  • Download URL: flask_loguru-1.0.0.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.1.0 requests-toolbelt/0.9.1 tqdm/4.34.0 CPython/3.6.5

File hashes

Hashes for flask_loguru-1.0.0.tar.gz
Algorithm Hash digest
SHA256 cb811f1a69aa6e9dbd54620d32d3b35efec54bb763f5ac1e7a1cc3ddae38960e
MD5 0344d13481d8970d1054d9778dd969f4
BLAKE2b-256 21f8cffcad66a27ff74a46a6b28d2671f232b605e51c617caf6c3e1daafa4546

See more details on using hashes here.

File details

Details for the file flask_loguru-1.0.0-py2.py3-none-any.whl.

File metadata

  • Download URL: flask_loguru-1.0.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.1.0 requests-toolbelt/0.9.1 tqdm/4.34.0 CPython/3.6.5

File hashes

Hashes for flask_loguru-1.0.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 00e4fa454177acf6b08ca17ed7055b9d9e8f016cc1181aff66f18eb3153d598b
MD5 c58ef2cc4eb68a4f15265c3955b01374
BLAKE2b-256 1cbe01d187c6017c7aa8dc63228e1fe7e6d1ac0a9c616671b9f9bfb58bb94150

See more details on using hashes here.

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