Commit 087f3233 authored by Julien Muchembled's avatar Julien Muchembled Committed by Kazuhiko Shiozaki

version up: Products.LongRequestLogger 2.0.0

parent c1c88983
......@@ -113,14 +113,6 @@ class Recipe(GenericBaseRecipe):
if instance_home:
zope_environment["INSTANCE_HOME"] = instance_home
# longrequestlogger product which requires environment settings
longrequest_logger_file = self.options.get('longrequest-logger-file', None)
if longrequest_logger_file:
# add needed zope configuration
zope_environment['longrequestlogger_file'] = longrequest_logger_file
zope_environment['longrequestlogger_timeout'] = self.options.get('longrequest-logger-timeout', None)
zope_environment['longrequestlogger_interval'] = self.options.get('longrequest-logger-interval', None)
# configure default Zope2 zcml
open(self.options['site-zcml'], 'w').write(open(self.getTemplateFilename(
'site.zcml')).read())
......
......@@ -168,7 +168,7 @@ md5sum = 1b515056c5892a86d4ece252ad114a97
[template-zope-conf]
<= download-base
filename = zope.conf.in
md5sum = 0bf51218ecbf2bd319214192448a3ef7
md5sum = c1cd0be406152c79e137dcf8c81f52f2
[template-runzope-userhosts-preloaded]
<= download-base
......@@ -324,7 +324,7 @@ md5sum = 985c0010db6b553a89dbdb31353c56f5
[template-zope]
<= download-base
filename = instance-zope.cfg.in
md5sum = 07d5d0df5d16b46602760a8673d4395b
md5sum = bac5ff1ded5454749ec0e18d0ae1dae8
link-binary =
${aspell:location}/bin/aspell
${dmtx-utils:location}/bin/dmtxwrite
......@@ -646,7 +646,7 @@ Products.CMFActionIcons = 2.1.3
Products.DCWorkflowGraph = 0.4.1
Products.ExternalEditor = 2.0.0
Products.GenericSetup = 1.8.0
Products.LongRequestLogger = 1.1.post1
Products.LongRequestLogger = 2.0.0
Products.MimetypesRegistry = 2.0.8
Products.PluginRegistry = 1.3
Products.TIDStorage = 5.4.9
......
......@@ -292,6 +292,13 @@ node-id = {{ dumps(node_id_base ~ '-' ~ index) }}
{% endfor -%}
import-list = {{ dumps(list(import_set)) }}
zodb-dict = {{ dumps(zodb_dict) }}
{% if longrequest_logger_interval > 0 -%}
longrequest-logger-file = {{ longrequest_logger_base_path ~ name ~ ".log" }}
longrequest-logger-timeout = {{ longrequest_logger_timeout }}
longrequest-logger-interval = {{ longrequest_logger_interval }}
{% else -%}
longrequest-logger-file =
{% endif -%}
[{{ conf_name }}]
< = zope-conf-base
......@@ -301,15 +308,6 @@ context =
[{{ section(name) }}]
< = zope-base
{% if longrequest_logger_interval < 0 -%}
longrequest-logger-file =
longrequest-logger-timeout =
longrequest-logger-interval =
{% else -%}
longrequest-logger-file = {{ longrequest_logger_base_path ~ name ~ ".log" }}
longrequest-logger-timeout = {{ longrequest_logger_timeout }}
longrequest-logger-interval = {{ longrequest_logger_interval }}
{% endif -%}
wrapper = ${directory:services}/{{ name }}
configuration-file = {{ '${' ~ conf_name ~ ':rendered}' }}
......@@ -339,7 +337,7 @@ path = ${directory:promises}/{{ zope_tunnel_base_name }}
[{{ section('logrotate-entry-' ~ name) }}]
< = logrotate-entry-base
name = {{ name }}
log = {{ '${' ~ conf_parameter_name ~ ':event-log}' }} {{ '${' ~ conf_parameter_name ~ ':z2-log}' }} {{ '${' ~ name ~ ':longrequest-logger-file}' }} {{ ' '.join(log_list) }}
log = {{ '${' ~ conf_parameter_name ~ ':event-log}' }} {{ '${' ~ conf_parameter_name ~ ':z2-log}' }} {{ '${' ~ conf_parameter_name ~ ':longrequest-logger-file}' }} {{ ' '.join(log_list) }}
post = {{ bin_directory }}/slapos-kill --pidfile {{ '${' ~ conf_parameter_name ~ ':pid-file}' }} -s USR2
{% endmacro -%}
......
......@@ -42,6 +42,14 @@ products {{ parameter_dict['instance-products'] }}
secret {{ parameter_dict['deadlock-debugger-password'] }}
</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>
{% endif -%}
{% if 'tidstorage-ip' in parameter_dict -%}
<product-config TIDStorage>
backend-ip {{ parameter_dict['tidstorage-ip'] }}
......
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