Skip to main content

Collerated request logger for GAE python3 flexible|standard environment

Project description

GAE Collerated Logger

Collerated request logger for GAE python3 flexible|standard environment

Install

from PyPI

pip install gaecl

from github

pip install --user git+https://github.com/takashi8/gaecl

Use as WSGI Middleware

from gaecl import RequestLoggerMiddleware

# app: WSGI app instance

app = Flask(__name__)
app = RequestLoggerMiddleware(
    app,
    loglevel='INFO',
    project=os.getenv('GOOGLE_CLOUD_PROJECT'),
    module=os.getenv('GAE_SERVICE'),
    version=os.getenv('GAE_VERSION'),
)

@app.route('/')
def log():
    logging.info('info log')
    logging.warn('warn log')
    logging.error('error log')
    logging.critical('critical log')
    return 'ok'

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for gaecl, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size gaecl-0.1.0-py3-none-any.whl (6.0 kB) File type Wheel Python version py3 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page