Justice common log format for python
- Free software: Apache Software License 2.0
Basic
import flask
from justice_python_common_log.flask import Log
app = flask.Flask(__name__)
Log(app)Exclude specific endpoint
Log(app, excluded_paths=['/swaggerui.*', '/analytics/apidocs'])Exclude specific agent
Log(app, excluded_agents=['ELB'])Basic
from fastapi import FastAPI
from justice_python_common_log.fastapi import Log
app = FastAPI()
Log(app)Exclude specific endpoint
Log(app, excluded_paths=['/swaggerui.*', '/game-telemetry/apidocs'])Exclude specific agent
Log(app, excluded_agents=['ELB'])FULL_ACCESS_LOG_ENABLED : Enable full access log mode. Default: false.
FULL_ACCESS_LOG_SUPPORTED_CONTENT_TYPES : Supported content types to shown in request_body and response_body log. Default: application/json,application/xml,application/x-www-form-urlencoded,text/plain,text/html.
FULL_ACCESS_LOG_MAX_BODY_SIZE : Maximum size of request body or response body that will be processed, will be ignored if exceed more than it. Default: 10240 bytes