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.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

gaecl-0.1.0-py3-none-any.whl (6.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page