Skip to main content

Documentation

The documentation is hosted at https://github.com/BingerYang/logger_app

Installation

pip install logger_app

Usage

example:

# -*- coding: utf-8 -*-

from logger_app import FormatterRule, LoggerApp
from flask import request, Flask

app = Flask(__name__)
app.config['PROPAGATE_EXCEPTIONS'] = False  # 设置是否传递异常 , 如果为True, 则flask运行中的错误会显示到网页中, 如果为False, 则会输出到文件中


# FormatterRule.CB_TAG_MAP = dict(path=lambda: request.path, md5=lambda: request.host_url)


@app.route('/')
def index():
    # num = 1 / 0
    app.logger.error('this is a error')
    return "index"


if __name__ == '__main__':
    app.logger = LoggerApp(__name__, fmt=FormatterRule(style='json')).create_logger()

    app.run(debug=True)

Metadata

Release files for logger-app 0.0.2.23091422

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

Built distribution (wheel)

Table of built distributions (wheels) for logger-app 0.0.2.23091422
File Interpreter ABI Platform
logger_app-0.0.2.23091422-py2.py3-none-any.whl Python 3, Python 2 none any Details

Release files / logger_app-0.0.2.23091422-py2.py3-none-any.whl

Download URL logger_app-0.0.2.23091422-py2.py3-none-any.whl
Size 6.1 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
df18fa4c965e6841f4c1ebd2bdb3581c0ecd135bd3b12fd3d06d5d883aa16ffc
BLAKE2b-256 checksum
How to use checksums
7e2b6cbeecda2c4ed726f215fc09213cb1db941c0795879e769c510f1019a50b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.6

Security for logger-app 0.0.2.23091422

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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