Commit 4814623d 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 86135831
...@@ -893,10 +893,6 @@ class TestZopeMedusa(ZopeTestMixin, ERP5InstanceTestCase): ...@@ -893,10 +893,6 @@ class TestZopeMedusa(ZopeTestMixin, ERP5InstanceTestCase):
class TestZopeWSGI(ZopeTestMixin, ERP5InstanceTestCase): class TestZopeWSGI(ZopeTestMixin, ERP5InstanceTestCase):
wsgi = True wsgi = True
@unittest.expectedFailure
def test_long_request_log_rotation(self):
super().test_long_request_log_rotation()
@unittest.expectedFailure @unittest.expectedFailure
def test_basic_authentication_user_in_access_log(self): def test_basic_authentication_user_in_access_log(self):
super().test_basic_authentication_user_in_access_log() super().test_basic_authentication_user_in_access_log()
......
...@@ -639,7 +639,7 @@ eggs = ${neoppod:eggs} ...@@ -639,7 +639,7 @@ eggs = ${neoppod:eggs}
# Other products # Other products
Products.MimetypesRegistry Products.MimetypesRegistry
Products.TIDStorage Products.TIDStorage
Products.LongRequestLogger haufe.requestmonitoring
# BBB: Temporarily keep zope.app.testing awaiting we use newer version of CMF # BBB: Temporarily keep zope.app.testing awaiting we use newer version of CMF
# (for tests like testCookieCrumbler). # (for tests like testCookieCrumbler).
...@@ -774,7 +774,7 @@ APacheDEX = 1.8 ...@@ -774,7 +774,7 @@ APacheDEX = 1.8
Pillow = 6.2.2 Pillow = 6.2.2
Products.CMFActionIcons = 2.1.3 Products.CMFActionIcons = 2.1.3
Products.GenericSetup = 1.8.6 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.1 requires AccessControl>=3.0.0Acquisition.
Products.MimetypesRegistry = 2.0.10 Products.MimetypesRegistry = 2.0.10
Products.PluggableAuthService = 1.10.0 Products.PluggableAuthService = 1.10.0
......
...@@ -34,11 +34,11 @@ md5sum = 45cc45510b59ceb730b6e38448b5c0c3 ...@@ -34,11 +34,11 @@ md5sum = 45cc45510b59ceb730b6e38448b5c0c3
[template-zope-conf] [template-zope-conf]
filename = zope.conf.in filename = zope.conf.in
md5sum = e8e1e76385d76cafbc6ad33e1c8573f2 md5sum = ae1232116a1dd4a68fdfab286c849945
[site-zcml] [site-zcml]
filename = site.zcml filename = site.zcml
md5sum = 43556e5bca8336dd543ae8068512aa6d md5sum = f45dc4568b63de39f49b8fecca5deef1
[template-my-cnf] [template-my-cnf]
filename = my.cnf.in filename = my.cnf.in
...@@ -86,7 +86,7 @@ md5sum = 0ac4b74436f554cd677f19275d18d880 ...@@ -86,7 +86,7 @@ md5sum = 0ac4b74436f554cd677f19275d18d880
[template-zope] [template-zope]
filename = instance-zope.cfg.in filename = instance-zope.cfg.in
md5sum = 5ff5314df6a865104a4fdf621d0e620f md5sum = e1d4aa00b7a2d04b37a703ec6ffe4b2f
[template-balancer] [template-balancer]
filename = instance-balancer.cfg.in filename = instance-balancer.cfg.in
......
...@@ -247,7 +247,15 @@ pem = {{dumps(storage_dict.pop(k))}} ...@@ -247,7 +247,15 @@ pem = {{dumps(storage_dict.pop(k))}}
<= run-common <= run-common
instance-home = ${directory:instance} instance-home = ${directory:instance}
{% if wsgi -%} {% 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 -%} {% else -%}
wrapped-command-line = '{{ bin_directory }}/runzope' -C '${:configuration-file}' wrapped-command-line = '{{ bin_directory }}/runzope' -C '${:configuration-file}'
{%- endif %} {%- endif %}
......
...@@ -23,4 +23,6 @@ ...@@ -23,4 +23,6 @@
<securityPolicy <securityPolicy
component="AccessControl.security.SecurityPolicy" /> component="AccessControl.security.SecurityPolicy" />
<include package="haufe.requestmonitoring" file="monitor.zcml"/>
</configure> </configure>
...@@ -55,11 +55,16 @@ trusted-proxy 0.0.0.0 ...@@ -55,11 +55,16 @@ trusted-proxy 0.0.0.0
</product-config> </product-config>
{% if 'longrequest-logger-interval' in parameter_dict -%} {% if 'longrequest-logger-interval' in parameter_dict -%}
<product-config LongRequestLogger> %import haufe.requestmonitoring
logfile {{ parameter_dict['longrequest-logger-file'] }} <requestmonitor requestmonitor>
timeout {{ parameter_dict['longrequest-logger-timeout'] }} period {{ parameter_dict['longrequest-logger-timeout'] }}s
interval {{ parameter_dict['longrequest-logger-interval'] }} verbosity 0
</product-config> <monitorhandler dumper>
factory Products.ERP5Type.patches.LongRequestLogger_dumper.factory
repeat -1
time {{ parameter_dict['longrequest-logger-interval'] }}s
</monitorhandler>
</requestmonitor>
{% endif -%} {% 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