Skip to content

Commit

Permalink
minor update
Browse files Browse the repository at this point in the history
Signed-off-by: wangbaiping(wbpcode) <wangbaiping@bytedance.com>
  • Loading branch information
wangbaiping(wbpcode) committed Jan 26, 2025
1 parent 46d3295 commit 98b9968
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,5 @@ message GenericRds {
//
// If the ``envoy.access_loggers.file`` logger is used for generic proxy, this formatter will
// be enabled by default.
message GenericProxyLogFormatter {
message GenericProxySubstitutionFormatter {
}
8 changes: 4 additions & 4 deletions changelogs/current.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,9 @@ new_features:
- area: generic_proxy
change: |
Added :ref:`generic proxy log formatter support
<envoy_v3_api_msg_extensions.filters.network.generic_proxy.v3.GenericProxyLogFormatter>` which could be configured
at the :ref:`formatters <envoy_v3_api_field_config.core.v3.SubstitutionFormatString.formatters>` extension point
of logger to support generic proxy specific substitution commands. And all access loggers could be used in
generic proxy now.
<envoy_v3_api_msg_extensions.filters.network.generic_proxy.v3.GenericProxySubstitutionFormatter>` which could be
configured at the :ref:`formatters <envoy_v3_api_field_config.core.v3.SubstitutionFormatString.formatters>`
extension point of logger to support generic proxy specific substitution commands. And all access loggers could be
used in generic proxy now.
deprecated:
7 changes: 4 additions & 3 deletions source/extensions/filters/network/generic_proxy/access_log.cc
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@ class GenericProxyCommandParserFactory : public Formatter::CommandParserFactory
return createGenericProxyCommandParser();
}
ProtobufTypes::MessagePtr createEmptyConfigProto() override {
return std::make_unique<
envoy::extensions::filters::network::generic_proxy::v3::GenericProxyLogFormatter>();
return std::make_unique<envoy::extensions::filters::network::generic_proxy::v3::
GenericProxySubstitutionFormatter>();
}

std::string name() const override { return "envoy.formatters.generic_proxy_commands"; }
Expand Down Expand Up @@ -191,7 +191,8 @@ absl::Status initializeFormatterForFileLogger(
"Access log: no format and no default format for file access log");
}

envoy::extensions::filters::network::generic_proxy::v3::GenericProxyLogFormatter formatter;
envoy::extensions::filters::network::generic_proxy::v3::GenericProxySubstitutionFormatter
formatter;
auto* formatter_extension = config.mutable_log_format()->mutable_formatters()->Add();
formatter_extension->set_name("envoy.formatters.generic_proxy_commands");
formatter_extension->mutable_typed_config()->PackFrom(formatter);
Expand Down

0 comments on commit 98b9968

Please sign in to comment.