Where can I find logs created by request_handle:logInfo("Hello World.")

Hi,

I followed the examples at Istio / Envoy Filter and created a few test services. I can add a custom header to my incoming request, but I cannot find the envoy log. I checked the ingress gateway pod and the istiod pod.

I checked bot Istio and Envoy proxy’s documentation, but nowhere mentioned where I can see the logs.

My EnvoyFilter looks like this:

apiVersion: networking.istio.io/v1alpha3
kind: EnvoyFilter
metadata:
  name: add-header
spec:
  workloadSelector:
    labels:
      app: echoserver
  configPatches:
    # The first patch adds the lua filter to the listener/http connection manager
  - applyTo: HTTP_FILTER
    match:
      context: SIDECAR_INBOUND
      listener:
        portNumber: 80
        filterChain:
          filter:
            name: "envoy.filters.network.http_connection_manager"
            subFilter:
              name: "envoy.filters.http.router"
    patch:
      operation: INSERT_BEFORE
      value: # lua filter specification
       name: envoy.filters.http.lua
       typed_config:
          "@type": "type.googleapis.com/envoy.extensions.filters.http.lua.v3.Lua"
          inlineCode: |
            function envoy_on_request(request_handle)
              request_handle:logInfo("hello envoy")
              request_handle:headers():add("x-envoy-filter", "yoyo")
            end

Thanks.

It will seem a stupid question, but… do you have accessLog configured on your istio control plane? I mean, when your request passes through the ingress or the istio proxies do you see any log at all?

Yes, I set accessLog to /dev/stdou. I can see the normal request log, but not the log I wrote in the Lua script.