Cross platform redirect the access_log output to (stderr/stdout)#15202
Cross platform redirect the access_log output to (stderr/stdout)#15202davinci26 wants to merge 48 commits intoenvoyproxy:mainfrom
Conversation
Signed-off-by: Sotiris Nanopoulos <sonanopo@microsoft.com>
Signed-off-by: Sotiris Nanopoulos <sonanopo@microsoft.com>
|
CC @envoyproxy/api-shepherds: Your approval is needed for changes made to |
|
Mostly a WiP, my VM can't compile and run all the tests so I have to iterate over the CI a bit. Will update when its ready for a review |
Signed-off-by: Sotiris Nanopoulos <sonanopo@microsoft.com>
Signed-off-by: Sotiris Nanopoulos <sonanopo@microsoft.com>
Signed-off-by: Sotiris Nanopoulos <sonanopo@microsoft.com>
Signed-off-by: Sotiris Nanopoulos <sonanopo@microsoft.com>
Signed-off-by: Sotiris Nanopoulos <sonanopo@microsoft.com>
Signed-off-by: Sotiris Nanopoulos <sonanopo@microsoft.com>
Signed-off-by: Sotiris Nanopoulos <sonanopo@microsoft.com>
Signed-off-by: Sotiris Nanopoulos <sonanopo@microsoft.com>
Signed-off-by: Sotiris Nanopoulos <sonanopo@microsoft.com>
Signed-off-by: Sotiris Nanopoulos <sonanopo@microsoft.com>
Signed-off-by: Sotiris Nanopoulos <sonanopo@microsoft.com>
Signed-off-by: Sotiris Nanopoulos <sonanopo@microsoft.com>
Signed-off-by: Sotiris Nanopoulos <sonanopo@microsoft.com>
Signed-off-by: Sotiris Nanopoulos <sonanopo@microsoft.com>
Signed-off-by: Sotiris Nanopoulos <sonanopo@microsoft.com>
|
@antoniovicente @jmarantz since both of you were involved in the discussions, do you want to do the code review? |
| "envoy.config.accesslog.v2.FileAccessLog"; | ||
|
|
||
| // A path to a local file to which to write the access log entries. | ||
| string path = 1 [(validate.rules).string = {min_len: 1}]; |
There was a problem hiding this comment.
The reason we don't wrap these two properties into a struct and make them oneof is to maintain backwards compatibility
There was a problem hiding this comment.
Stepping back for a sec, do you think it makes sense for a "file access log" to output to console, stderr, stdout, etc.? Or should we have ConsoleAccessLog, StderrAccessLog, StdoutAccessLog?
If we think putting this functionality in FileAccessLog makes sense, here is what I would suggest:
- Deprecate path
- Add a new oneof "output_type" or similar
- Define a new message for each option: Path, Console, Stderr, Stdout (this allows for future extensibility)
I would then use ^ in the admin proto (and deprecate path their as well and/or potentially even allow loading full access log extensions so we can instantiate grpc access log, file access log, etc.). It's unfortunate that admin is not a full listener but that is a well known issue and I'm not suggesting we fix that here.
There was a problem hiding this comment.
I like the idea of creating ConsoleAccessLog, StderrAccessLog, StdoutAccessLog and using it everywhere.
Can I deprecate the path in admin and replace it with a config_type that accepts on of the configs above? Or I can just add the config_type property in admin.
There was a problem hiding this comment.
What I would do is deprecate path in admin and actually make it a repeated list of access log extensions the same as we use elsewhere. You will see it will be trivial to wire up in the fake admin listener.
Signed-off-by: Sotiris Nanopoulos <sonanopo@microsoft.com>
Signed-off-by: Sotiris Nanopoulos <sonanopo@microsoft.com>
Signed-off-by: Sotiris Nanopoulos <sonanopo@microsoft.com>
Signed-off-by: Sotiris Nanopoulos <sonanopo@microsoft.com>
Signed-off-by: Sotiris Nanopoulos <sonanopo@microsoft.com>
Signed-off-by: Sotiris Nanopoulos <sonanopo@microsoft.com>
Signed-off-by: Sotiris Nanopoulos <sonanopo@microsoft.com>
Signed-off-by: Sotiris Nanopoulos <sonanopo@microsoft.com>
Signed-off-by: Sotiris Nanopoulos <sonanopo@microsoft.com>
Signed-off-by: Sotiris Nanopoulos <sonanopo@microsoft.com>
|
@antoniovicente I did some updates, added docs and expect the CI to go green. Feel free to take another look when you get some time. |
Signed-off-by: Sotiris Nanopoulos <sonanopo@microsoft.com>
antoniovicente
left a comment
There was a problem hiding this comment.
Looks great, just a few nits and some small requests for additional tests.
Signed-off-by: Sotiris Nanopoulos <sonanopo@microsoft.com>
Signed-off-by: Sotiris Nanopoulos <sonanopo@microsoft.com>
antoniovicente
left a comment
There was a problem hiding this comment.
Looks great.
@mattklein123 off to you for API review.
|
thanks for the thoughtful review @antoniovicente |
mattklein123
left a comment
There was a problem hiding this comment.
Very cool. I'm sorry to have not looked at this sooner, but some high level API comments to discuss. Thank you.
/wait
| "envoy.config.accesslog.v2.FileAccessLog"; | ||
|
|
||
| // A path to a local file to which to write the access log entries. | ||
| string path = 1 [(validate.rules).string = {min_len: 1}]; |
There was a problem hiding this comment.
Stepping back for a sec, do you think it makes sense for a "file access log" to output to console, stderr, stdout, etc.? Or should we have ConsoleAccessLog, StderrAccessLog, StdoutAccessLog?
If we think putting this functionality in FileAccessLog makes sense, here is what I would suggest:
- Deprecate path
- Add a new oneof "output_type" or similar
- Define a new message for each option: Path, Console, Stderr, Stdout (this allows for future extensibility)
I would then use ^ in the admin proto (and deprecate path their as well and/or potentially even allow loading full access log extensions so we can instantiate grpc access log, file access log, etc.). It's unfortunate that admin is not a full listener but that is a well known issue and I'm not suggesting we fix that here.
Signed-off-by: Sotiris Nanopoulos <sonanopo@microsoft.com>
|
Closing to break it down into two PRs |
Commit Message:
Fixes: #13964
Additional Description:
Risk Level: Medium
Testing: Unit/Integration and Manual validation
Docs Changes: Completed
Release Notes: add
access_log_destinationproperty toFileAccessLogto write to standard streams in a cross platform way.Platform Specific Features: N/A