Skip to main content

Flask-logmanager

Manage level log of your flask application

Generate one logger by rule and add REST api for manager each logger

Installation

pip install flask-logmanager

Or

git clone https://github.com/fraoustin/flask-logmanager.git
cd flask-logmanager
python setup.py install

Usage

from flask import Flask, request, current_app
from flask_logmanager import LogManager

app = Flask(__name__)
app.register_blueprint(LogManager(url_prefix="/api", ui_testing=True))


@app.route("/testone")
def testOne():
    current_app.logger.error("error from testOne")
    current_app.logger.info("info from testOne")
    current_app.logger.debug("debug from testOne")
    return "Hello testOne!"

@app.route("/testtwo")
def testTwo():
    current_app.logger.error("error from testTwo")
    current_app.logger.info("info from testTwo")
    current_app.logger.debug("debug from testTwo")
    return "Hello testOne!"


if __name__ == "__main__":
    app.run(port=8080)   #TODO

You can change level log of /testone on http://127.0.0.1:8080/api/ui

ui

If you want change level in your application

from flask_logmanager import get_logger_by_rule
import logging

get_logger_by_rule('/testone').setLevel(logging.DEBUG)

Feature

# add management login: user and group # test with connexion application

V. 0.2.10

  • hotfix url for ui

V. 0.2.9

  • hotfix requirement

V. 0.2.7

  • add param url_prefix

V. 0.2.6

  • add level default

V. 0.2.5

  • add property endpoints for flask-bluelogin

V. 0.2.4

  • hotfix for base_model

V. 0.2.3

  • hotfix for error 405 on set logger

V. 0.2.2

  • hotfix for dynamic host and port in swagger.yaml

V. 0.2.0

  • change manage current_app.logger

  • change swagger-ui (default swagger.yaml)

  • decorator to_json

  • concentrate call logging on __init__

V. 0.1.0

  • init

Metadata

Release files for flask-logmanager 0.2.11

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-logmanager 0.2.11
File Size Uploaded
flask-logmanager-0.2.11.tar.gz 963.7 kB Details

Release files / flask-logmanager-0.2.11.tar.gz

Download URL flask-logmanager-0.2.11.tar.gz
Size 963.7 kB
Tags Source
SHA-256 checksum
How to use checksums
9c8572072196c4f4706dfea27ebd4c65db58c5e8d9c96b017a9026754b9fc666
BLAKE2b-256 checksum
How to use checksums
552e12b6a518d7720010431d7a87f963c22496eff0883ad1250f56cdffa9b44c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/3.7

Release history Release notifications | RSS feed

This release

0.2.11 This release

1 release file

0.2.10

1 release file

0.2.9

1 release file

0.2.8

1 release file

0.2.7

1 release file

0.2.6

1 release file

0.2.5

1 release file

0.2.4

1 release file

0.2.3

1 release file

0.2.2

1 release file

0.2.1

1 release file

0.1.0

1 release file

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