5. Understanding the contents of wsgi.ini#

The file wsgi.ini references the zope.conf file, zope.conf is passed as an argument to the WSGI application defined by the Zope package.

WSGI server configuration.

paste.server_factory = plone.recipe.zope2instance:main
use = egg:plone.recipe.zope2instance#main
listen =
threads = 4

WSGI application configuration

use = egg:Zope#main
zope_conf = /home/thomas/devel/plone/minimal52/parts/instance/etc/zope.conf

Paste Deploy's filters are a powerful concept for non-intrusively glueing middleware/infrastructure components together.

use = egg:Paste#translogger
setup_console_handler = False

use = egg:plone.recipe.zope2instance#sentry
dsn = https://3cfa2cdda6614de9966ce008416cae00@sentry.io/1537247
level = DEBUG
event_level = WARNING
ignorelist = waitress.queue

Applications and filters are combined in pipelines.

pipeline =

Following the pipeline section up to the end of the file is the logging configuration. The logging configuration is passed to the standard libraries logging.config module and follows the configuration file format described in the Python documentation. The handler_accesslog and handler_eventlog sections configure the instance access and event log files, respectively.

keys = root, plone, waitress.queue, waitress, wsgi

keys = console, accesslog, eventlog

keys = generic, message

level = INFO
handlers = console, eventlog

level = INFO
handlers = eventlog
qualname = plone

level = INFO
handlers = eventlog
qualname = waitress.queue
propagate = 0

level = INFO
handlers = eventlog
qualname = waitress

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

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

class = FileHandler
args = ('/home/thomas/devel/plone/minimal52/var/log/instance-access.log','a')
level = INFO
formatter = message

class = FileHandler
args = ('/home/thomas/devel/plone/minimal52/var/log/instance.log', 'a')
level = NOTSET
formatter = generic

format = %(asctime)s %(levelname)-7.7s [%(name)s:%(lineno)s][%(threadName)s] %(message)s

format = %(message)s

5.1. The WSGI pipeline#