gunicorn/examples/log_app.py
Benoit Chesneau 95b7ffeeaa chore: prepare release 25.0.2
- Bump version to 25.0.2
- Update copyright year to 2026 in LICENSE and NOTICE
- Add license headers to all Python source files
- Add changelog entry for 25.0.2
2026-02-06 08:21:18 +01:00

21 lines
478 B
Python

#
# This file is part of gunicorn released under the MIT license.
# See the NOTICE for more information.
import logging
log = logging.getLogger(__name__)
log.addHandler(logging.StreamHandler())
def app_factory(global_options, **local_options):
return app
def app(environ, start_response):
start_response("200 OK", [])
log.debug("Hello Debug!")
log.info("Hello Info!")
log.warn("Hello Warn!")
log.error("Hello Error!")
return [b"Hello World!\n"]