Commit ae2c51a6 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 9701af3a
......@@ -859,10 +859,6 @@ class TestZopeMedusa(ZopeTestMixin, ERP5InstanceTestCase):
class TestZopeWSGI(ZopeTestMixin, ERP5InstanceTestCase):
wsgi = True
@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()
......
......@@ -639,7 +639,7 @@ eggs = ${neoppod:eggs}
# Other products
Products.MimetypesRegistry
Products.TIDStorage
Products.LongRequestLogger
haufe.requestmonitoring
# BBB: Temporarily keep zope.app.testing awaiting we use newer version of CMF
# (for tests like testCookieCrumbler).
......@@ -774,7 +774,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 requires AccessControl>=3.0.0Acquisition.
Products.MimetypesRegistry = 2.0.10
Products.PluggableAuthService = 1.10.0
......
......@@ -34,11 +34,11 @@ md5sum = 45cc45510b59ceb730b6e38448b5c0c3
[template-zope-conf]
filename = zope.conf.in
md5sum = e8e1e76385d76cafbc6ad33e1c8573f2
md5sum = bb4fe9f1ff6e6ed3c7074a8335f632d9
[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 = a88a1bd76e35275a0caf2d418acde4b7
md5sum = 460a45e4dc013c7cffda2880b922e40e
[template-balancer]
filename = instance-balancer.cfg.in
......
......@@ -247,7 +247,15 @@ pem = {{dumps(storage_dict.pop(k))}}
<= run-common
instance-home = ${directory:instance}
{% if wsgi -%}
wrapped-command-line = '{{ bin_directory }}/runwsgi' {% 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>
......@@ -55,11 +55,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