Merge "Fix haproxy user flow log format substitution"
This commit is contained in:
commit
d78e992a9e
@ -357,8 +357,9 @@ haproxy_amphora_opts = [
|
||||
help=_('Size of the HAProxy stick table. Accepts k, m, g '
|
||||
'suffixes. Example: 10k')),
|
||||
cfg.StrOpt('user_log_format',
|
||||
default='{project_id} {lb_id} %f %ci %cp %t %{+Q}r %ST %B %U '
|
||||
'%[ssl_c_verify] %{+Q}[ssl_c_s_dn] %b %s %Tt %tsc',
|
||||
default='{{ project_id }} {{ lb_id }} %f %ci %cp %t %{+Q}r %ST '
|
||||
'%B %U %[ssl_c_verify] %{+Q}[ssl_c_s_dn] %b %s %Tt '
|
||||
'%tsc',
|
||||
help=_('Log format string for user flow logging.')),
|
||||
|
||||
# REST server
|
||||
|
@ -121,8 +121,8 @@ class JinjaTemplater(object):
|
||||
|
||||
def _format_log_string(self, load_balancer, protocol):
|
||||
log_format = CONF.haproxy_amphora.user_log_format.replace(
|
||||
'{project_id}', load_balancer.project_id)
|
||||
log_format = log_format.replace('{lb_id}', load_balancer.id)
|
||||
'{{ project_id }}', load_balancer.project_id)
|
||||
log_format = log_format.replace('{{ lb_id }}', load_balancer.id)
|
||||
|
||||
# Order of these filters matter.
|
||||
# TODO(johnsom) Remove when HAProxy handles the format string
|
||||
|
@ -122,8 +122,8 @@ class JinjaTemplater(object):
|
||||
|
||||
def _format_log_string(self, load_balancer, protocol):
|
||||
log_format = CONF.haproxy_amphora.user_log_format.replace(
|
||||
'{project_id}', load_balancer.project_id)
|
||||
log_format = log_format.replace('{lb_id}', load_balancer.id)
|
||||
'{{ project_id }}', load_balancer.project_id)
|
||||
log_format = log_format.replace('{{ lb_id }}', load_balancer.id)
|
||||
|
||||
# Order of these filters matter.
|
||||
# TODO(johnsom) Remove when HAProxy handles the format string
|
||||
|
Loading…
x
Reference in New Issue
Block a user