Skip to main content

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")

Metadata

Release files for flask-loguru 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for flask-loguru 1.0.0
File Size Uploaded
flask_loguru-1.0.0.tar.gz 5.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for flask-loguru 1.0.0
File Interpreter ABI Platform
flask_loguru-1.0.0-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 12.7 kB

Release files / flask_loguru-1.0.0.tar.gz

Download URL flask_loguru-1.0.0.tar.gz
Size 5.2 kB
Tags Source
SHA-256 checksum
How to use checksums
cb811f1a69aa6e9dbd54620d32d3b35efec54bb763f5ac1e7a1cc3ddae38960e
BLAKE2b-256 checksum
How to use checksums
21f8cffcad66a27ff74a46a6b28d2671f232b605e51c617caf6c3e1daafa4546
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / flask_loguru-1.0.0-py2.py3-none-any.whl

Download URL flask_loguru-1.0.0-py2.py3-none-any.whl
Size 7.5 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
00e4fa454177acf6b08ca17ed7055b9d9e8f016cc1181aff66f18eb3153d598b
BLAKE2b-256 checksum
How to use checksums
1cbe01d187c6017c7aa8dc63228e1fe7e6d1ac0a9c616671b9f9bfb58bb94150
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page