Title: option deprecation (envoy.config.filter.accesslog.v2.AccessLog.config)
Description:
I've been testing Envoy 1.13 for the last few weeks. The version is bb7ceff4c3c5bd4555dff28b6e56d27f2f8be0a7/1.13.0/Clean/RELEASE/BoringSSL.
Every time I start the proxy I got the following message on logs:
[2020-02-13 08:53:49.967][1][warning][misc] [source/common/protobuf/utility.cc:441] Using deprecated option 'envoy.config.filter.accesslog.v2.AccessLog.config' from file accesslog.proto. This configuration will be removed from Envoy soon. Please see https://www.envoyproxy.io/docs/envoy/latest/intro/deprecated for details.
The used configuration for logging is:
access_log:
- name: envoy.file_access_log
config:
path: "/dev/stdout"
The same configuration applies for several listeners, and the log messages are really logged. So, everything works just fine. But, given that this way of logging is going to change, I decided to move to the new configuration. I got this in my config files:
access_log:
- name: envoy.access_loggers.file
typed_config:
"@type": type.googleapis.com/envoy.config.accesslog.v2.FileAccessLog
path: "/dev/stdout"
Now I can't get Envoy started. I have this kind of messages in the output:
[2020-02-13 08:50:57.503][1][critical][main] [source/server/server.cc:94] error initializing configuration '/etc/envoy/envoy.yaml': Didn't find a registered implementation for name: 'envoy.access_loggers.file'
I also tried the following configuration, and had the same erroneous message:
access_log:
- name: envoy.access_loggers.file
typed_config:
"@type": type.googleapis.com/envoy.extensions.access_loggers.file.v3.FileAccessLog
path: "/dev/stdout"
So, is it possible that this new logging configurations is not yet available in version 1.13? It would then be included in version 1.14, is that alright?
Greetings
In 1.13 the extension name is required and envoy.file_access_log is the correct name for the file access logger. Using config for extensions is deprecated and typed_config is preferred. Either the v2 or v3 type should work.
In "1.14-dev" (starting at 9cc7a5ca) the name of the access logger changed to envoy.access_loggers.file, but you may continue to use the deprecated envoy.file_access_log. Also in 1.14-dev (after 08ec4dd7), when using typed_config the name is no longer necessary to determine the extension type. See https://www.envoyproxy.io/docs/envoy/latest/configuration/overview/extension.html.
Perfect. Thank you a lot.
I'm closing because I feel my question was answered.
Most helpful comment
In 1.13 the extension name is required and
envoy.file_access_logis the correct name for the file access logger. Usingconfigfor extensions is deprecated andtyped_configis preferred. Either the v2 or v3 type should work.In "1.14-dev" (starting at 9cc7a5ca) the name of the access logger changed to
envoy.access_loggers.file, but you may continue to use the deprecatedenvoy.file_access_log. Also in 1.14-dev (after 08ec4dd7), when usingtyped_configthe name is no longer necessary to determine the extension type. See https://www.envoyproxy.io/docs/envoy/latest/configuration/overview/extension.html.