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): ...@@ -836,10 +836,6 @@ class ZopeTestMixin(ZopeSkinsMixin, CrontabMixin):
class TestZopeWSGI(ZopeTestMixin, ERP5InstanceTestCase): class TestZopeWSGI(ZopeTestMixin, ERP5InstanceTestCase):
@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()
......
...@@ -551,7 +551,6 @@ eggs = ${neoppod:eggs} ...@@ -551,7 +551,6 @@ eggs = ${neoppod:eggs}
# Other products # Other products
Products.MimetypesRegistry Products.MimetypesRegistry
Products.TIDStorage Products.TIDStorage
Products.LongRequestLogger
# 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).
...@@ -601,6 +600,7 @@ eggs = ${neoppod:eggs} ...@@ -601,6 +600,7 @@ eggs = ${neoppod:eggs}
Products.Sessions Products.Sessions
Products.ZODBMountPoint Products.ZODBMountPoint
Record Record
haufe.requestmonitoring
# StructuredText # StructuredText
Zope Zope
# Python3 # Python3
...@@ -710,7 +710,7 @@ APacheDEX = 1.8 ...@@ -710,7 +710,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.8 Products.MimetypesRegistry = 2.1.8
Products.PluggableAuthService = 2.3 Products.PluggableAuthService = 2.3
Products.PluginRegistry = 1.6 Products.PluginRegistry = 1.6
......
...@@ -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 = 7c82d4c49e01a72a173f2bc66f1524d6 md5sum = c3bf601ce7224cbb45618c846b67c54f
[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 = a7e911ae01f78adf5a6634a15b9af569 md5sum = 1d0cfbefbfee93e28c07f7813b94723c
[template-balancer] [template-balancer]
filename = instance-balancer.cfg.in filename = instance-balancer.cfg.in
......
...@@ -357,7 +357,15 @@ context = ...@@ -357,7 +357,15 @@ context =
<= run-common <= run-common
instance-home = ${directory:instance} instance-home = ${directory:instance}
{% if wsgi -%} {% 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 -%} {% 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>
...@@ -52,11 +52,16 @@ trusted-proxy 0.0.0.0 ...@@ -52,11 +52,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 2
</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