plone / plone.recipe.zope2instance

zc.buildout recipe to setup and configure a Zope 2 instance.
https://pypi.org/project/plone.recipe.zope2instance
6 stars 23 forks source link

Make logging configurable for WSGI #59

Open icemac opened 5 years ago

icemac commented 5 years ago

Currently the wsgi_ini_template contains a fix logging configuration:

See https://github.com/plone/plone.recipe.zope2instance/blob/master/src/plone/recipe/zope2instance/recipe.py#L1138-L1178

It would be nice to be able to change this configuration via buildout when installing the buildout part.

davisagli commented 5 years ago

My 2 cents: if you need something more than the simple configuration, write your own ini file rather than writing code to generate it.

But, it would be nice to at least handle the existing options for setting the log level.

icemac commented 5 years ago

@davisagli That's what I am doing: I am creating wsgi.ini using a template recipe and replacing the one created by this recipe. This works fine. It would be nice to be able to omit the extra step.

davisagli commented 5 years ago

@icemac are you just changing the log level, or also changing other things from the default logging configuration?

icemac commented 5 years ago

@davisagli I am (nearly) completely changing the logging configuration, so a single option containing the whole logging configuration would suit my needs.

zopyx commented 5 years ago

I suggested to set level=INFO for logger_plone instead of DEBUG. The default logging is very verbose - both for developers and users.

zopyx commented 5 years ago

PR https://github.com/plone/plone.recipe.zope2instance/pull/66

Sakoes commented 1 day ago

Implemented wsgi-logging-ini-template to provide a fully custom logging config in https://github.com/plone/plone.recipe.zope2instance/pull/196. Available in release 7.1.0. However, there seems to be an issue: https://github.com/plone/plone.recipe.zope2instance/pull/197