If I understand your question correctly, then you should check out this documentation of Lua filters.
https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/lua_filter
https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/lua_filter#script-examples
body = handle:body() should give you the request or response body, depending upon the handle.
handle:logInfo(message) should help you log it.
For me print statement also had worked.
e.g. print(headers["Cache-Control"]) was putting the header value in the log of my app on GCP project's kubernetes cluster.
You need to apply an EnvoyFilter in your kubernetes cluster and in the lua code, you can log the request body.
Also keep in mind that 'The filter should be configured with the name envoy.lua' ONLY