Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

logging with WSGI #526

georgpfolz opened this issue Mar 8, 2019 · 3 comments


Copy link

commented Mar 8, 2019

Zope 4 deploys by default with the waitress WSGI server. Out of the box, no log files are created when running such an instance. It would be helpful to have logging preconfigured (in the zope.ini I guess) in a similar way than with ZServer.


This comment has been minimized.

Copy link

commented Mar 8, 2019

@pbauer pbauer closed this Mar 8, 2019


This comment has been minimized.

Copy link

commented Mar 9, 2019

I don't use Plone nor zc.buildout so it's not a fix for me. But it was helpful as I could glean enough information to build my own zope.ini:

use = egg:Zope#main
zope_conf = %(here)s/wsgi.conf

use = egg:waitress#main
host =
port = 8080

use = egg:Paste#translogger
setup_console_handler = False

pipeline =

keys = root, waitress, wsgi

keys = console, accesslog, eventlog

keys = generic, message

format = %(asctime)s %(levelname)-5.5s [%(name)s:%(lineno)s][%(threadName)s] %(message)s
datefmt = %Y-%m-%d %H:%M:%S

format = %(message)s

level = INFO
handlers = console

level = INFO
handlers = eventlog
qualname = waitress

level = WARN
handlers = accesslog
qualname = wsgi
propagate = 0

class = StreamHandler
args = (sys.stderr,)
level = NOTSET
formatter = generic

class = FileHandler
args = ('%(here)s/../log/Z4.log','a')
level = INFO
formatter = message

class = FileHandler
args = ('%(here)s/../log/event.log', 'a')
level = INFO
formatter = generic

I'm not sure if it's all correct as I'm not familiar with waitress configuration (but it works). I was hoping the default zope.ini on deployment could be like that.

@icemac icemac reopened this Mar 9, 2019


This comment has been minimized.

Copy link

commented Mar 12, 2019

I see a value in having a default logging configuration when creating a Zope instance using bin/mkwsgiinstance.

@icemac icemac added this to To do in Zope 4 final release via automation Mar 12, 2019

@icemac icemac added this to the 4.0 final milestone Mar 12, 2019

@dataflake dataflake closed this in 647180d Apr 10, 2019

Zope 4 final release automation moved this from To do to Done Apr 10, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants
You can’t perform that action at this time.