Error response body log basic.lua

I changed file basic.lua for log body response.
I see in error.log message “API disabled in the context of log_by_lua*”.
I don’t know how can i change or what´s going on .

Thanks.

Hi,

You should read the ngx_lua documentation to make sure that you did not call a function that cannot be used in the log_by_lua_* phase. You can see that each function there has a “context” section describing the supported contexts.

Accessorily, sharing with us the edits you made to this file would have been helpful, as we could have pointed out the mistake to you :slight_smile: