bottlepy / bottle

bottle.py is a fast and simple micro-framework for python web-applications.
http://bottlepy.org/
MIT License
8.4k stars 1.46k forks source link

No output to console when using external backend server #1260

Closed mrdc closed 3 years ago

mrdc commented 3 years ago

Hello,

Is it correct behavior that there is no output to console when using, for example, cheroot as backend?

run(host='0.0.0.0', port=8900, server='cheroot', debug=False)

I see in console only this:

Bottle v0.13-dev server starting up (using CherootServer())...
Listening on http://0.0.0.0:8900/
Hit Ctrl-C to quit.
Julienh commented 3 years ago

Hello, I have the same issue.

defnull commented 3 years ago

Access logs are generated by the server implementation, not by bottle. The wsgiref development server emits logs by default, cheroot does not, apparently. Refer to the cheroot documentation on how to activate access logs.

Julienh commented 3 years ago

Not possible I guess : https://github.com/cherrypy/cheroot/issues/89

Jwink3101 commented 3 years ago

Check out https://stackoverflow.com/a/31093434/3633154

This is what I do

rpcope1 commented 3 years ago

There's also decent WSGI middleware for doing logging. When using Cheroot with Bottle, I usually use https://pypi.org/project/wsgi-request-logger/ for request logging.