Conditional operation on access log command operators

124 views
Skip to first unread message

seared1

unread,
Jun 8, 2023, 9:29:43 PM6/8/23
to envoy-users
I am using the %CONNECTION_TERMINATION_DETAILS% access log command operator for holding a Message variable with connection termination details in json_format access log (like below).

When there is no termination happening, the value emitted by this is null in the logs. Instead of null can I have it emit an empty string? As I have logging requirements for values to be either empty strings or 0 for integers when the value is not available.

          access_log:
            - name: envoy.access_loggers.stdout
              typed_config:
                "@type": type.googleapis.com/envoy.extensions.access_loggers.stream.v3.StdoutAccessLog
                log_format:
                  json_format:
                    ApplicationProtocol: "%REQ(:SCHEME)%"
                    Message: "%CONNECTION_TERMINATION_DETAILS%"

Thanks!!

Yan Avlasov

unread,
Jun 9, 2023, 11:12:50 AM6/9/23
to seared1, envoy-users
You can file an Issue on GitHub and someone may have time to address your problem.

--
You received this message because you are subscribed to the Google Groups "envoy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to envoy-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/envoy-users/3a5363fe-e73e-447c-8b0f-545910d1edf9n%40googlegroups.com.

王杰

unread,
Jun 13, 2023, 6:20:24 AM6/13/23
to envoy-users
Reply all
Reply to author
Forward
0 new messages