Commit 44f611ce authored by Jérome Perrin's avatar Jérome Perrin

stack/erp5: use haufe.requestmonitoring instead of Products.LongRequestLogger

haufe.requestmonitoring already supports WSGI and Python3 and seems
used and maintainted.
parent bb87a453
......@@ -836,10 +836,6 @@ class ZopeTestMixin(ZopeSkinsMixin, CrontabMixin):
class TestZopeWSGI(ZopeTestMixin, ERP5InstanceTestCase):
@unittest.expectedFailure
def test_long_request_log_rotation(self):
super().test_long_request_log_rotation()
@unittest.expectedFailure
def test_basic_authentication_user_in_access_log(self):
super().test_basic_authentication_user_in_access_log()
......
......@@ -551,7 +551,6 @@ eggs = ${neoppod:eggs}
# Other products
Products.MimetypesRegistry
Products.TIDStorage
Products.LongRequestLogger
# BBB: Temporarily keep zope.app.testing awaiting we use newer version of CMF
# (for tests like testCookieCrumbler).
......@@ -601,6 +600,7 @@ eggs = ${neoppod:eggs}
Products.Sessions
Products.ZODBMountPoint
Record
haufe.requestmonitoring
# StructuredText
Zope
# Python3
......@@ -710,7 +710,7 @@ APacheDEX = 1.8
Pillow = 6.2.2
Products.CMFActionIcons = 2.1.3
Products.GenericSetup = 1.8.6
Products.LongRequestLogger = 2.1.0
haufe.requestmonitoring = 0.6.0
Products.MimetypesRegistry = 2.1.8
Products.PluggableAuthService = 2.3
Products.PluginRegistry = 1.6
......
......@@ -34,11 +34,11 @@ md5sum = 45cc45510b59ceb730b6e38448b5c0c3
[template-zope-conf]
filename = zope.conf.in
md5sum = 7c82d4c49e01a72a173f2bc66f1524d6
md5sum = c3bf601ce7224cbb45618c846b67c54f
[site-zcml]
filename = site.zcml
md5sum = 43556e5bca8336dd543ae8068512aa6d
md5sum = f45dc4568b63de39f49b8fecca5deef1
[template-my-cnf]
filename = my.cnf.in
......@@ -86,7 +86,7 @@ md5sum = 0ac4b74436f554cd677f19275d18d880
[template-zope]
filename = instance-zope.cfg.in
md5sum = a7e911ae01f78adf5a6634a15b9af569
md5sum = 1d0cfbefbfee93e28c07f7813b94723c
[template-balancer]
filename = instance-balancer.cfg.in
......
......@@ -357,7 +357,15 @@ context =
<= run-common
instance-home = ${directory:instance}
{% if wsgi -%}
wrapped-command-line = '{{ bin_directory }}/runwsgi' --event-log-file={{ '${' ~ conf_parameter_name ~ ':event-log}' }} --access-log-file={{ '${' ~ conf_parameter_name ~ ':z2-log}' }} {% if webdav %}-w{% endif %} {{ ipv4 }}:${:port} {% if timerserver_interval %}--timerserver-interval={{ timerserver_interval }}{% endif %} '${:configuration-file}'
wrapped-command-line =
'{{ bin_directory }}/runwsgi'
--event-log-file={{ '${' ~ conf_parameter_name ~ ':event-log}' }}
--access-log-file={{ '${' ~ conf_parameter_name ~ ':z2-log}' }}
{% if longrequest_logger_interval > 0 %} --long-request-log-file={{ '${' ~ conf_parameter_name ~ ':longrequest-logger-file}' }} {% endif %}
{% if webdav %}-w{% endif %}
{{ ipv4 }}:${:port}
{% if timerserver_interval %}--timerserver-interval={{ timerserver_interval }}{% endif %}
'${:configuration-file}'
{% else -%}
wrapped-command-line = '{{ bin_directory }}/runzope' -C '${:configuration-file}'
{%- endif %}
......
......@@ -23,4 +23,6 @@
<securityPolicy
component="AccessControl.security.SecurityPolicy" />
<include package="haufe.requestmonitoring" file="monitor.zcml"/>
</configure>
......@@ -52,11 +52,16 @@ trusted-proxy 0.0.0.0
</product-config>
{% if 'longrequest-logger-interval' in parameter_dict -%}
<product-config LongRequestLogger>
logfile {{ parameter_dict['longrequest-logger-file'] }}
timeout {{ parameter_dict['longrequest-logger-timeout'] }}
interval {{ parameter_dict['longrequest-logger-interval'] }}
</product-config>
%import haufe.requestmonitoring
<requestmonitor requestmonitor>
period {{ parameter_dict['longrequest-logger-timeout'] }}s
verbosity 2
<monitorhandler dumper>
factory Products.ERP5Type.patches.LongRequestLogger_dumper.factory
repeat -1
time {{ parameter_dict['longrequest-logger-interval'] }}s
</monitorhandler>
</requestmonitor>
{% endif -%}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment